Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>Solution 1</em></p> <p>If you're really averse to touching your mark-up, you could use some jQuery as such (Thanks to thirtydot for the tip):</p> <p><strong>Jquery</strong></p> <pre><code>$('.card:nth-child(3n+1)').css('clear','left'); </code></pre> <p><hr> <em>Solution 2</em></p> <p>It might be cleaner (and more backwards-compatible) to just slightly alter your HTML. Perhaps wrap each row in its own wrapper, with a clearfix applied to that.</p> <p>jsfiddle: <a href="http://jsfiddle.net/leifparker/sh4fR/" rel="nofollow">http://jsfiddle.net/leifparker/sh4fR/</a></p> <p>You'll need to add the 'clearfix' CSS code. See the fiddle.</p> <p><strong>HTML</strong></p> <pre><code>&lt;div id="wrap"&gt; &lt;div class="cards clearfix"&gt; &lt;div class="card"&gt; 1 text text text text text text text text text text text text text text text text text text text text text text text text text text &lt;/div&gt; &lt;div class="card"&gt; 2 text text text text text text text text text text text text text text text text text text text text text text text text text text &lt;/div&gt; &lt;div class="card"&gt; 3 text text text text text text text text text text text text text text text text &lt;/div&gt; &lt;/div&gt; &lt;div class="cards clearfix"&gt; &lt;div class="card"&gt; 4 text text text text text text text text text text text text text text text text text text text text text text text text text text &lt;/div&gt; &lt;div class="card"&gt; 5 text text text text text text text text text text text text text text text text &lt;/div&gt; &lt;div class="card"&gt; 6 text text text text text text text text text text text text text text text text &lt;/div&gt; &lt;/div&gt; </code></pre>
    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. This table or related slice is empty.
    1. 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