Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



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

Posts: 21
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 08:58 AM..
JamesU2002 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-08-2010, 04:02 PM Re: IE6 Help! Double Margin/Padding?
LadynRed's Avatar
Defies a Status

Posts: 10,016
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 !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

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.10972 seconds with 12 queries