IE 5.01 Problem. Float Margin Too Large!

Discussion in 'CSS' started by Masterful, Oct 24, 2008.

  1. #1
    I have to optimise my site for IE 5.01 compatibility. I've fixed everything, except a problem with my horizontal menu (at the top):

    [​IMG]

    As you can see, it floats too far to the right. It's meant to start where the base line beneath it begins. Also, the font is too large - much larger than in any other browser. The large font and the extended floating to the right pushes the last button underneath the rest.

    At first, I thought it was the double float margin bug. I therefore tried adding the fix (display: inline;) to various parts of the CSS, but nothing happened. Anyone know how I can fix this?

    Here's the CSS:

    /* ######### Menu ######### */
    
    #menu {
    	padding: 0;
            margin: 0 40px 25px 50px;
    }
    
    .ddcolortabs{
    	padding: 0;
    	width: 100%;
    	background: transparent;
    	voice-family: "\"}\"";
    	voice-family: inherit;
    }
    
    .ddcolortabs ul{
    	font-family: helvetica, arial, sans-serif;
    	font-size: 12px;
    	margin: 0;
    	padding: 0;
    	list-style: none;
    }
    
    .ddcolortabs li{
    	display: inline;
    	margin: 0 2px 0 0;
    	padding: 0;
    }
    
    .ddcolortabs a{
    	font-weight: bold;
    	float: left;
    	color: #000;
    	background: #e6ede7 url(images/color_tabs_left.gif) no-repeat left top;
    	margin: 0 1px 0 0;
    	padding: 0 0 1px 3px;
    	text-decoration: none;
    	letter-spacing: 1px;
    }
    
    .ddcolortabs a span{
    	float: left;
    	display: block;
    	background: transparent url(images/color_tabs_right.gif) no-repeat right top;
    	padding: 4px 4px 2px 4px;
    }
    
    .ddcolortabs a span{
    	float: none;
    }
    
    .ddcolortabs a:hover{
    	background-color: #87b77b;
    	text-decoration: none;	
    }
    
    .ddcolortabs a:hover span{
    	background-color: #87b77b;
    }
    
    .ddcolortabs .selected a, .ddcolortabs .selected span {
    background-color: #8cb85c;
    }
    
    /* ######### Menu Line ######### */
    
    .ddcolortabsline{
            margin: 0 10px 0 0;
    	clear: both;
    	padding: 0;
    	width: 900px;
    	height: 8px;
    	line-height: 8px;
    	background: #e6ede7;
    	border-top: 1px solid #fff;
    }
    Code (markup):
     
    Masterful, Oct 24, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    I don't see any examples of a float with margins, or display inline in your posted css. Please post a link to the page. I don't have IE5 (does anyone, really?), but maybe seeing the page and its source will let me or someone else spot the problem.

    Frankly, I can't imagine even thinking about IE5 nowadays. How many people are even using Win98* that haven't upgraded to IE6? Are there even enough computers that old to worry about?

    cheers,

    gary

    * I confess to having an old Win98 box, and I suppose I could use the recovery disc to reinstall IE5. Nah. Why would I? :)
     
    kk5st, Oct 25, 2008 IP
    Masterful likes this.
  3. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Thanks for the response, Kk5st!

    Here's the code for the menu:

    <div id="menu">
    
    <div class="ddcolortabs">
    
    <ul>
    <li><a href=""><span>Home</span></a></li>
    <li><a href=""><span>Categories</span></a></li>
    <li><a href=""><span>Stores</span></a></li>
    <li><a href=""><span>Popular</span></a></li>
    <li><a href=""><span>Exclusive</span></a></li>	
    <li><a href=""><span>New</span></a></li>
    <li><a href=""><span>Expiring</span></a></li>
    <li><a href=""><span>Submit</span></a></li>
    <li><a href=""><span>Request</span></a></li>	
    </ul>
    
    </div>
    
    <div class="ddcolortabsline">&nbsp;</div>
                                              
    </div>
    Code (markup):
    The problem only occurs in IE 5.01. Can you see any obvious errors?
     
    Masterful, Oct 25, 2008 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    Reduce the width of the #container to 900px, centered. Then let the block elements take their natural widths, without using margins to control them.

    I don't know if that will help, as I can't test; it couldn't hurt.

    Does your client pay a hefty premium for the IE5 compat? He should. That browser is dead and buried.

    cheers,

    gary
     
    kk5st, Oct 25, 2008 IP
  5. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #5
    Thanks, Kk5st, but that won't work. No worries . . . I'll try something else. I still added points to your reputation.

    I'm trying to secure compatibility for my own site, not for a client's. I am going to pay to advertise my site, so it's important that I make it compatible with as many browsers as possible. I realise that IE 5.01 is ancient and that it's used by less than 1% of people, but I still feel that I should accommodate it - at least for another year or so.
     
    Masterful, Oct 25, 2008 IP
  6. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #6
    Some companies, like Facebook, and some known developers have dropped IE6 so I don't think you need to worry about those two guys who still use IE5.
     
    drhowarddrfine, Oct 25, 2008 IP