Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>To case n°1:</strong></p> <p>It depends, if you have for example a list of nine teasers where three teasers fill a line, I'd do it with one row:</p> <pre><code>&lt;ul class="row"&gt; &lt;li class="span4"&gt;&lt;/li&gt; &lt;li class="span4"&gt;&lt;/li&gt; &lt;li class="span4"&gt;&lt;/li&gt; &lt;!-- six more --&gt; &lt;/ul&gt; </code></pre> <p>If you're using the grid for layouting a form, I'd make a row for each label-input pair:</p> <pre><code>&lt;!-- one label-input pair does not fill the whole content width --&gt; &lt;form&gt; &lt;div class="row"&gt; &lt;label class="span3"&gt;&lt;/label&gt; &lt;input class="span5" /&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;label class="span3"&gt;&lt;/label&gt; &lt;input class="span5" /&gt; &lt;/div&gt; &lt;!-- and so on --&gt; &lt;/form&gt; </code></pre> <p>I think you shouldn't make a grid and put your content in the different grid cells to layout it, but build semantically correct markup and apply the grid to layout the content (tiny difference).</p> <p>PS: keep <a href="http://quirksmode.org/css/user-interface/boxsizing.html" rel="nofollow">box-sizing</a> in mind.</p> <p><strong>To n°2:</strong></p> <p>I don't quite get the idea there, if you're using the grid, you shouldn't apply left/right-margin to it. The grid depends on its horizontal margins to work properly... if you have to change this to match your frontend with the design it's probably not in the grid anymore.</p> <p>Update: I'd most certainly use your first example though, if you have smaller content. But use the correct grid span widths:</p> <pre><code>&lt;article class="row"&gt; &lt;header class="span12"&gt;&lt;/header&gt; &lt;div class="span10 offset1"&gt; &lt;div class="row"&gt; &lt;div class="span5"&gt;&lt;/div&gt; &lt;div class="span5"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/article&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. VO
      singulars
      1. This table or related slice is empty.
    2. 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