Note that there are some explanatory texts on larger screens.

plurals
  1. POWeird text wrapping differences between browsers
    primarykey
    data
    text
    <p>Trying to debug a bigger problem I managed to reduce it to this simple situation: </p> <p>Here it is in jsFiddle: <a href="http://jsfiddle.net/uUGp6/" rel="nofollow">http://jsfiddle.net/uUGp6/</a></p> <p>Here's the HTML:</p> <pre><code>&lt;div class="box"&gt; &lt;img class="pic" src="http://i3.minus.com/jbuwgurDfNniFM.png"/&gt; Test 1 this is a test: testa testb testc testd teste &lt;/div&gt; &lt;div class="divider"/&gt;&lt;/div&gt; &lt;div class="box"&gt; &lt;img class="pic" src="http://i3.minus.com/jbuwgurDfNniFM.png"/&gt; Test 2&lt;br/&gt; this is a test testa testb testc testd teste &lt;/div&gt; </code></pre> <p>And the CSS:</p> <pre><code>.box { background-color: beige; float: left; margin-right: 10px; height: 100px; } .pic { float: left; } .divider { clear:both; height:10px; width:500px; background:blue; } </code></pre> <p>In Firefox,Chrome and Safari the text in the second box is wrapped. A new line starts after "testc" However in Opera, IE9, IE8 there is no wrapping.</p> <p>The only difference between the two boxes is the br tag in the second one.</p> <p>I don't understand why in the second box the line gets wrapped but in the first box a much bigger line is not wrapped. And what does the br tag have to do with it? Does anyone know what I can do to force the browsers to display it in the same way?</p> <p>Also, which browsers get it right?</p> <p>P.S. </p> <p>The floats are essential (like i said, this is a simplification of a bigger problem).</p> <p>I should add that I'm testing this on Windows 7</p> <p>Edit: it wraps in Safari as well</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.
    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