owosso Posted November 27, 2007 Share Posted November 27, 2007 I'm having problems determining a happy medium with browsers for my horizontal menu. Both the height of the grey menu bar and its placement of text varies from browser to browser. Of course, I.E. is the worst. (One I.E. user with resolution set at 1024x768 cannot fit site on screen without scrolling.)I'm trying to set an overall height of 38 px. and the text should be vertically centered.Here is my CSS code: #navHor { width: 695px; height: 23px; position: absolute; top: 137px; padding-left: 65px; padding-top: 5px; z-index: 5; background-color: #999999; padding-bottom: 10px; border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; border-top-color: #000000; border-bottom-color: #000000; } Here is the body code: <div id="navHor"> <p><a href="jwrindex.html">Home</a><span><a href="#.html">Contact</a></span><span><a href="#">Equipment Sales</a></span><span><a href="#">News</a></span><span><a href="#">Employment</a></span></p> </div> Here is the link:http://www.adunate.com/jwrIndex.htmlHere is what I.E. views (pre minor content changes in other areas):http://www.adunate.com/forum.html Link to comment Share on other sites More sharing options...
Ingolme Posted November 27, 2007 Share Posted November 27, 2007 Try putting this within #navHor:height: 38px; line-height: 38px;It's a CSS that can't fail to vertically center text within a container. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.