babybackriib
01-07-2008, 08:04 PM
Hello,
I'm trying to create a nav menu on one line with 2 items: one on the left side and one on the right. It works correctly in Mac's Safari & Firefox and Windows Firefox: both items show up on the same line on opposite sides. But in Windows IE 6 or 7, the two items appear on the correct sides, but are on 2 lines.
I'm using images instead of text and they have rollovers. I have no idea why IE 6/7 is displaying the items on 2 lines and would appreciate any help. My CSS and HTML is below.
CSS
#header #secondary-nav { float: left; width: 100%; }
#header li#contact a, #header li#activities a { display: inline; height: 0; padding-top: 18px; overflow: hidden; background-repeat: no-repeat; background-position: 0 0; }
#header li#activities a { float: left; margin: 7px 0 7px 10px; background-image: url(../img/activities.gif); width: 125px; }
#header li#contact a { float: right; margin: 7px 10px 7px 0; background-image: url(../img/contact.gif); width: 177px; }
#header li#activities a:hover, #header li#contact a:hover { background-position: 0 -18px; }
HTML
<ul id="secondary-nav">
<li id="activities"><a href="/upcoming-activities/" title="Upcoming Activities">Upcoming Activities</a></li>
<li id="contact"><a href="/contact/" title="Contact">Contact</a></li>
</ul>
Thank you!
I'm trying to create a nav menu on one line with 2 items: one on the left side and one on the right. It works correctly in Mac's Safari & Firefox and Windows Firefox: both items show up on the same line on opposite sides. But in Windows IE 6 or 7, the two items appear on the correct sides, but are on 2 lines.
I'm using images instead of text and they have rollovers. I have no idea why IE 6/7 is displaying the items on 2 lines and would appreciate any help. My CSS and HTML is below.
CSS
#header #secondary-nav { float: left; width: 100%; }
#header li#contact a, #header li#activities a { display: inline; height: 0; padding-top: 18px; overflow: hidden; background-repeat: no-repeat; background-position: 0 0; }
#header li#activities a { float: left; margin: 7px 0 7px 10px; background-image: url(../img/activities.gif); width: 125px; }
#header li#contact a { float: right; margin: 7px 10px 7px 0; background-image: url(../img/contact.gif); width: 177px; }
#header li#activities a:hover, #header li#contact a:hover { background-position: 0 -18px; }
HTML
<ul id="secondary-nav">
<li id="activities"><a href="/upcoming-activities/" title="Upcoming Activities">Upcoming Activities</a></li>
<li id="contact"><a href="/contact/" title="Contact">Contact</a></li>
</ul>
Thank you!