I'm having trouble understanding how to vertically center an inline list in a div. Can anyone recommend some reading?
The list is used for a horizontal nav bar with a background. I've set the height of the div to 20px because that's the height of the bg image.
Also: Should the font specs be where they are (#nav ul) or maybe in the #nav section?
Here's the code:
Code:#nav { background: url(../images/nav_bg2.gif); text-align: center; overflow: hidden; height: 20px; } #nav ul{ margin:0; padding:0; list-style:none; } #nav li{ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 0.75em; display:inline; margin:0; padding:0; }



Reply With Quote


Bookmarks