Hello All ! ! !
I have create a horizontal menu with some sub menus.
The menu is constructed like that
The top LI has that CSS
.menu2
{
padding:0 0 0 0px;
margin:0;
list-style:none; height:40px;
position:relative;
margin-top: 13px;
}
The Sub menus are having this code
.menu2 ul
{
position:absolute;
left:-9999px;
top:-9999px;
width:0;
height:0;
margin:0;
padding:0;
list-style:none;
}
When i open my page the menu is working perfectly ! ! !
The problem start when i try to scroll my page ! ! !
Then the menu comes down as i scroll my page and goes back again when i scroll on top.
Why ? ? ?
what can i do for ? ? ?
Many many thanks ! ! !
Ok I might be bale to help....
I like to see the page i am working with so do you have a website I can view this page on?
ditch the absolute position
ditch the absolute position in the menu
remove the follwing:
position:absolute;
left:-9999px;
top:-9999px;
Thanks a lot obiwan ! ! !
Thanks a lot obiwan ! ! !
That was a small part of the problem that solved but still I have a problem ! ! !
Ok Ok Take the code :
html ->>
CSS---->
.menu2
{
padding:0 0 0 0px;
margin:0;
list-style:none;
height:40px;
background-color: #AAFF00;
position:relative;
margin-top: 13px;
}
.menu2 li.top
{
display:block;
float:left;
position:relative;
}
.menu2 li a.top_link
{
display:block;
float:left;
height:40px;
line-height:33px;
color:#bbb;
text-decoration:none;
font-size:11px;
font-weight:bold;
padding:0 0 0 12px;
cursor:pointer;
}
.menu2 li a.top_link span
{
float:left;
display:block;
padding:0 24px 0 12px;
height:40px;
}
.menu2 li a.top_link span.down
{
float:left;
display:block;
padding:0 24px 0 12px;
height:40px;
}
.menu2 li a.top_link:hover
{
color:#fff;
}
.menu2 li:hover > a.top_link
{
color:#fff;
}
.menu2 table
{
border-collapse:collapse;
width:0;
height:0;
position:absolute;
top:0;
left:0;
}
.menu2 a:hover
{
visibility:visible;
}
.menu2 li:hover
{
position:relative;
z-index:200;
}
.menu2 ul,
.menu2 :hover ul ul,
.menu2 :hover ul :hover ul ul,
.menu2 :hover ul :hover ul :hover ul ul,
.menu2 :hover ul :hover ul :hover ul :hover ul ul
{
position:absolute;
left:-9999px;
top:-9999px;
width:0;
height:0;
margin:0;
padding:0;
list-style:none;
}
.menu2 :hover ul.sub
{
left:2px;
top:40px;
background: #fff;
padding:3px 0;
border:1px solid #4ab;
white-space:nowrap;
width:93px;
height:auto;
}
.menu2 :hover ul.sub li
{
display:block;
height:20px;
position:relative;
float:left;
width:90px;
}
.menu2 :hover ul.sub li a
{
display:block;
font-size:11px;
height:20px;
width:87px;
line-height:20px;
text-indent:5px; color:#000;
text-decoration:none;
border:3px solid #fff;
border-width:0 0 0 3px;
}
.menu2 :hover ul.sub li a:hover
{
background:#4ab;
color:#fff;
}
.menu2 :hover ul.sub li a.fly:hover
{
color:#fff;
}
.menu2 :hover ul li:hover > a.fly
{
color:#fff;
}
.menu2 :hover ul :hover ul,
.menu2 :hover ul :hover ul :hover ul,
.menu2 :hover ul :hover ul :hover ul :hover ul,
.menu2 :hover ul :hover ul :hover ul :hover ul :hover ul
{
left:90px;
top:-4px;
background: #fff;
padding:3px 0;
border:1px solid #4ab;
white-space:nowrap;
width:93px;
z-index:200;
height:auto;
}
CSS IE -->
.menu2
{
margin-top: 0px;
position: static;
}
.menu2 li.top
{
position:relative;
}
.menu2 ul,
.menu2 :hover ul ul,
.menu2 :hover ul :hover ul ul,
.menu2 :hover ul :hover ul :hover ul ul,
.menu2 :hover ul :hover ul :hover ul :hover ul ul
{
width:0;
height:0;
margin:0;
padding:0;
list-style:none;
}
Many Many thanks from the begining ! ! !
Ok.....
1st of all please can you in future add all of you're CSS and/or HTML in a code tag. You can do this by highlighting all of you're code and clicking the code button above it should look like this
. This is just so we can read it easier and copy it easier.
Ok I have taken the code and set it up on a subdomain of mine. It no longer scrolls as I can see but the drop down menus do not work is this the problem you are having now?
I'm realy so sorry about the
I'm realy so sorry about the
tag. Just i forgot it :( The proble after your fixation is that the drop down menus are not cerectly positioned. Are opening on the apper left of the page ! ! ! ! ? ? ? ?
No problem
Thats cool just makes our lives easier.
Ok so I tried your HTML and CSS on Firefox and the drop down menu did not work at all. What browsers have you checked this on?
So . . . In the Firefox the
So . . .
In the Firefox the code working as it is ! ! !
and it works perfect ! ! !
On Internet explorer i have the problem ! ! !
That's why I have create a seperate CSS file only for the IE but doesn't work ! ! !
So....
Is your menu supposed to have drop down menus in it?
I have send you a private
I have send you a private message ! ! !
Take a look and then reply ! ! !
Many many thanks ! ! !
Just a reminder that this is
Just a reminder that this is a public help forum where threads are started for the possible benefit of all, please avoid the use of the PM system for private help, except in rare circumstances.


