
Originally Posted by
jcmcobra
puts it immediately centered and to the right of its parent. N'est-ce pa?
It shouldn't, that should be so far down the page you can't even mouse-over to it... unless you're NOT getting the position:relative on your LI.
Ok, what you seem to have is constantly setting and unsetting values -- what I posted above was supposed to replace the ENTIRE menu declaration in your CSS, not just part of it... you've got all sorts of confused and conflicted values overriding each-other in there -- you STILL have the display:none and display:block nonsense...
EVERYTHING in your CSS starting with #mainMenu was supposed to be replaced by the code I posted, just with the position:relative I forgot on the LI added. You've still got half your old code in there after it, and that's completely messing up positioning.
For example these:
Code:
#mainMenu li ul {
display: none;
}
/* no space between sub-menu links */
#mainMenu li:hover ul {
display: block;
position: absolute;
}
Shouldn't even be in there! My code changing overflow on hover supplants that... then this:
Code:
#mainMenu li:hover ul li a {
display:block;
padding:6px 8px;
margin-bottom:0;
text-decoration:none;
background:white;
color:#000;
border:1px solid #FDB;
-moz-border-radius:12px;
-webkit-border-radius:12px;
border-radius:12px;
}
is redundant to this, which declares mostly the same thing!
Code:
#mainMenu a {
display:block;
padding:6px 8px;
text-decoration:none;
color:#000;
background:#FFF8F0;
border:1px solid #FDB;
-moz-border-radius:12px;
-webkit-border-radius:12px;
border-radius:12px;
}
Only declare things that are DIFFERENT on child items, because they inherit... as such all that second one needs to read is:
Code:
#mainMenu li:hover ul li a {
background:white;
}
All the rest of that is already set!
Code:
#mainMenu li li {
width:auto;
}
auto-width in floats is unpredictable cross browser -- it's why flyouts and their parents generally have to be fixed width. (part of why I don't use them anymore and just use normal sub-navigations because, well, page-loads aren't evil)
Even so though, that massive top amount doesn't make any sense if the LI are getting position:relative;
Bookmarks