Reply
IE6 Help! Double Margin/Padding?
Old 03-08-2010, 07:44 AM IE6 Help! Double Margin/Padding?
Average Talker

Posts: 19
Trades: 0
Hi,

IE6 is adding a double margin/padding to my Navbar on the LEFT side.

I have tried display:inline; but it doesn't fix it.

I have tried adding display:inline; to navigation li aswell, still no fix.

It would seem also different Widths of the Nav boxes too.

Any idea?


HTML Code:
#navbar {
	float: left;
	margin: 10px auto 5px auto;
	min-height: 30px;
	height:auto !important;
	height: 30px; /* IE6 */
	width: 960px;
	display:inline;
}

#navigation {
   list-style: none;
   margin: 0; padding: 0;
   margin-left:15px;
}
#navigation li {
   float: left;
   margin-left: 5px; 
}
#navigation li a {
   display: block;
   width: 123px;
   text-align: center;
   padding: 3px 0;
color: #fff;
background-color: #322481;
text-decoration: none;
border: solid 2px #9d006f;
font-weight:bold;
font-size: 1.1em;
}
#navigation li a:hover {
color: #fff;
background-color: #d931a2;
text-decoration: none;
border: solid 2px #9d006f;
font-weight:bold;
font-size: 1.1em;
}
HTML Code:
<div id="navbar">
<ul id="navigation">
<li id="active"><a href="#" id="current">Link</a></li>
<li><a href="#">Link </a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>

Last edited by JamesU2002; 03-08-2010 at 07:58 AM..
JamesU2002 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 03-08-2010, 03:02 PM Re: IE6 Help! Double Margin/Padding?
LadynRed's Avatar
Super Moderator

Posts: 9,392
Location: Tennessee
Trades: 0
When you float something left or right and add a margin going in the same direction as the float - as you have float:left with a left margin, IE6 will DOUBLE that margin. The fix IS to add display: inline to the floated element with the margin applied. However, you must do this using conditional comments to call a separate css file that contains ONLY the code needed to correct IE.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to IE6 Help! Double Margin/Padding?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.09848 seconds with 13 queries