Note that there are some explanatory texts on larger screens.

plurals
  1. POfloat left/margin for two static width divs (ie6)
    primarykey
    data
    text
    <p>Ok, I have the following layout/CSS:</p> <pre><code>div#wrap { margin-left: auto; margin-right: auto; position: relative; width: 1400px; } div#header { float: left; margin: 50px 15px 0 50px; width: 135px; } div#blog { display: inline; float: left; margin: 50px 15px 0 50px; width: 1080px; } div#site { float: left; width: 100%; } </code></pre> <p>with:</p> <pre><code>&lt;div id="site"&gt; &lt;div id="wrap"&gt; &lt;div id="header"&gt;&lt;/div&gt; &lt;div id="blog"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>So, site covers window, 'wrap' is fixed width and is centered and 'header' and 'blog' are inside 'wrap' with defined width.</p> <p>The problem is as usual with IE6. 'blog' is shown under the 'header'. So it seems that float and/or margin does not work.</p> <p>It seems that it's not a double margin float bug, at least in DebugBar I see correct margins, but also there are some offsets (50px for header), which I don't know what it is, actually. Anyway, i tried to add 'display: inline' to both 'header' and 'blog', and it does not help.</p> <p>I don't have ie7 to see, but it does show correctly in ie8.</p> <p>I went through several tutorials on floating bugs for ie6, but could not find a solution for my problem (or i might have missed it).</p> <p>Any ideas how to 'heal' it without adding extra div's (i hope it's possible with css, like with doublemargin bug)</p> <p>p/s/ total width of divs with margin is 1345 &lt; 1400.</p> <p>EDIT1: the only thing that is strange is 'wrap' has 0 height.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload