Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is my proposed markup:</p> <pre><code>&lt;div class="row"&gt; &lt;div class="col half"&gt; &lt;div class="col narrow"&gt;(1)&lt;/div&gt; &lt;div class="col remainder"&gt;(2)&lt;/div&gt; &lt;/div&gt; &lt;div class="col remainder"&gt; &lt;div class="col narrow"&gt;(1)&lt;/div&gt; &lt;div class="col remainder"&gt;(2)&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;div class="col half"&gt;(3)&lt;/div&gt; &lt;div class="col remainder"&gt;(3)&lt;/div&gt; &lt;/div&gt; &lt;div class="row"&gt; (4) &lt;/div&gt;​ </code></pre> <p>And styles:</p> <pre><code>/* structure */ .row { clear: both; overflow: hidden; } .col { float: left; } .half { width: 50%; } .narrow { width: 30%; } .remainder { float: none !important; overflow: hidden; } /* skin: just for demo */ .row { text-align: center; border-bottom: 1px solid #999; } .half { background: #fcc; } .narrow { background: #ccf; } .remainder { background: #cfc; } </code></pre> <p>The first two rows are split into half. In each half are two cells: the first is called <code>narrow</code> and is floated. I put 30% on the width for this one just for the demo (note: that's 30% of the half of the row). The other column is called <code>remainder</code> and is <em>not</em> floated. It uses overflow to set its own rendering context, which means it fills the block to the right of the floated column.</p> <p>You can have more floated columns (left or right), but only one remainder.</p> <p>I put it up <a href="http://jsfiddle.net/8S9jH/2/" rel="nofollow">on jsfiddle</a>: play with it.</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. 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