IE6 and Margin Bug

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

  1. sbryan macrumors member

    Jun 6, 2007
    Here's the CSS 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


    Aug 16, 2005
    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

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

Share This Page