Note that there are some explanatory texts on larger screens.

plurals
  1. POthe understanding of float getting the element out of normal flow issue
    primarykey
    data
    text
    <p><a href="https://stackoverflow.com/questions/11917168/what-are-the-css-properties-that-get-elements-out-of-the-normal-flow">We learned</a> that <code>absolute</code>, <code>fixed</code> positioning and <code>float</code> properties, get the elements out of the normal flow.</p> <p>So Well, take a look at this example: <a href="http://jsfiddle.net/WKQgL/1/" rel="nofollow noreferrer">http://jsfiddle.net/WKQgL/1/</a></p> <pre><code>&lt;div class="pink float"&gt;&lt;/div&gt; &lt;div class="blue float"&gt;&lt;/div&gt; &lt;div class="green"&gt;&lt;/div&gt; &lt;div class="orange"&gt;&lt;/div&gt; </code></pre> <p>The two first boxed are floated left and out of normal flow, so the second two boxes fill their space, Therefore the Green box goes under the Red.</p> <p>But, how about this one? <a href="http://jsfiddle.net/WKQgL/24/" rel="nofollow noreferrer">http://jsfiddle.net/WKQgL/24/</a></p> <pre><code>&lt;div class="pink float"&gt;&lt;/div&gt; &lt;div class="blue float"&gt;&lt;/div&gt; &lt;div class="yellow"&gt;Well, why this text is out of the DIV?&lt;/div&gt; &lt;div class="green"&gt;&lt;/div&gt; &lt;div class="orange"&gt;&lt;/div&gt; </code></pre> <p><strong>We see that the text doesn't go beneath the boxes and take place in the bottom of them, so why?</strong></p> <hr> <p>In another example: There is a paragraph and a floated image:</p> <pre><code>&lt;img src="example.jpg" style="float:right"&gt; &lt;p&gt;This is a long paragraph surrounding the image&lt;/p&gt; </code></pre> <p>In the result we see a floated image in the right, that the paragraph surrounded it. Compare that when we use <code>absolute</code> for the image, then the texts go under the image. We said that <code>absolute</code> and <code>float</code> take the element out of the normal flow, so what's the difference?</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