IE6 and Margin Bug

Discussion in 'Web Design and Development' started by sbryan, Sep 15, 2009.

  1. sbryan macrumors member

    Joined:
    Jun 6, 2007
    #1
    Here's the CSS Code:

    Code:
    #greenbar {
    	float: left;
    	display: inline;
    	width: 180px;
    	height: 1px;
    	margin-top: 11px;
    	margin-left: 8px;
    	background-color: #6c0;
    }
    These dividing bars are 20px high in IE6 and I'm assuming it must be a problem with margins. Is there a quick fix for this particular element?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Applying a height to an inline element generally won't work. Make it a block or maybe inline-block and it may work. Partly depends on the specific HTML. Also make sure you have a DOCTYPE on the page, that will often make IE6 work slightly better with CSS.
     
  3. sbryan thread starter macrumors member

    Joined:
    Jun 6, 2007
    #3
    Tried the different display methods and verified the DOCTYPE. I've learned Safari and FF are versatile and IE7 shines compared to IE6.
    :mad:
     

Share This Page