I'm following this tutorial and am trying to modify it to my use: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-kick-butt-css3-mega-drop-down-menu/...
If I make the dropdown div to be the same full width as the horizontal menu bar, how do I make sure it's aligned with the menu bar?
I have found that I can change the left
declaration in the following CSS rules to get the dropdown to align with the menu bar.
#menu li:hover .dropdown_1column,
#menu li:hover .dropdown_2columns,
#menu li:hover .dropdown_3columns,
#menu li:hover .dropdown_4columns,
#menu li:hover .dropdown_5columns {
left:-1px; /* <-- change this to left: -150px (or whatever value will get it to align) */
top:auto;
}
But this doesn't seem like the best way for me to do this as different browsers render the menu slightly differently and therefore require different values in order to get the drop down to align.
What's a better way to get the dropd down to align with the menu bar? Or perhaps someone can point me to a better tutorial?
I've copied the code from the tutorial to this: http://jsfiddle.net/Pnn6V/. Please disregard the slight issues with the jsfiddle as it's not the problem I'm facing/not what I'm asking about.