Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a common issue when working with floats. There are a couple of common solutions:</p> <ol> <li><p>Add a div after the floats with <code>clear: both</code>. <a href="http://jsfiddle.net/dX2Xh/" rel="nofollow">Example</a>.</p> <pre><code>&lt;div style="float: left"&gt;&lt;/div&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;div style="clear: both"&gt;&lt;/div&gt; </code></pre></li> <li><p>Add the two floats into a container with the CSS attribute <code>overflow: auto</code>. <a href="http://jsfiddle.net/dX2Xh/1/" rel="nofollow">Example</a>.</p> <pre><code>&lt;div style="overflow: auto"&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre></li> <li><p>Make the parent element a float. <a href="http://jsfiddle.net/dX2Xh/2/" rel="nofollow">Example</a>.</p> <pre><code>&lt;div style="float: left"&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre></li> <li><p>Use the :after CSS pseudo element. <a href="http://jsfiddle.net/dX2Xh/3/" rel="nofollow">Example</a>.</p> <pre><code>.parentelement:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } </code></pre></li> <li><p>Adding a set height to the parent element. <a href="http://jsfiddle.net/dX2Xh/4/" rel="nofollow">Example</a>.</p> <pre><code>&lt;div style="height: 200px"&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;div style="float: left"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre></li> </ol> <p>Personally, I use option 2 for simplicity and semantics' sake</p> <p>See an updated version of your code <a href="http://jsfiddle.net/Eq3Wx/4/" rel="nofollow">here</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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