Note that there are some explanatory texts on larger screens.

plurals
  1. POfloating two divs side by side
    primarykey
    data
    text
    <p>I'm trying to float two divs side by side no matter what the size of the screen is. At the moment in IE 7 if I resize the windows the one div drops below the other. I think its because div2 contains a table and as soon as the edge of the window hits the table it drops below the div1.</p> <p>What I currently have works in IE9 and Firefox but it needs to work in IE6+7. I tried this solution <a href="https://stackoverflow.com/questions/266015/css-floats-how-do-i-keep-them-on-one-line">CSS floats - how do I keep them on one line?</a> but it didn't seem to help. Again I think this maybe due to the content that is inside these divs. How to replicate it?</p> <p>Code:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=utf-8 /&gt; &lt;title&gt;JS Bin&lt;/title&gt; &lt;style&gt; #wrapper { min-width:510px; width: auto !important; width: 510px; border: 1px solid red; } #div1 { float:left; color:blue; width:500px; border: 1px dashed purple; height: 400px;} #div2 { margin-left:505px; border:1px dashed purple;} #div2 table{border: 1px dotted green;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="wrapper"&gt; &lt;div id="div1" &gt; Sometimes I contain a table and sometimes I contain an object. Bother of which displays a chart &lt;/div&gt; &lt;div id="div2"&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; I am normally a report asdfasdfads dsafasdfasdfasdfasdfadsfasdfasdadfadsfadfsdfasdfsdffGreat Thanks, today has been quiet hot but somehow a bit cooler than this time last year. &lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>A live example can be found here <a href="http://jsbin.com/awijew/11" rel="nofollow noreferrer">http://jsbin.com/awijew/11</a></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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