float with no width fails in ie6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • warth33@hotmail.com

    float with no width fails in ie6

    Hi all

    I have the following html page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
    www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link href="test_styl e.css" type="text/css" rel="stylesheet " />
    </head>
    <body>
    <div class="selected _menu_tab">
    <div class="test">
    <img src="/02/images/arrow.gif" /<a class="menu_lin k"
    href="index.php ">Index</a>&nbsp;&nbsp;
    </div>
    </div>
    <div class="selected _menu_tab">
    <div class="test">
    <img src="/02/images/arrow.gif" /<a class="menu_lin k"
    href="index.php ">Index</a>&nbsp;&nbsp;
    </div>
    </div>
    </body>
    </html>

    and the following css file:

    ..selected_menu _tab{
    float:left;
    width:auto;
    background-image:url('/02/images/selected_tab.jp g');
    background-repeat:no-repeat;
    height:45px;
    padding-left:3px;
    padding-right:3px;
    }
    ..test{
    height:20px;
    padding-top:25px;
    }

    Well, in ie7 and ff the code works, which means that the two big divs
    are displayed one after the other, horizontally. But in IE 6 it doesnt
    work. The second big dig is rendered at the bottom of the first big
    div. Please have a look at this page so you can understand what I
    mean:



    Can anyone help me to solve this isssue?
  • dorayme

    #2
    Re: float with no width fails in ie6

    In article
    <a988b21e-57d3-41b2-8e6a-a146688cf8ff@c5 8g2000hsc.googl egroups.com>,
    warth33@hotmail .com wrote:

    >
    Can anyone help me to solve this isssue?
    Try float: left; on your "test" class.

    --
    dorayme

    Comment

    Working...