Note that there are some explanatory texts on larger screens.

plurals
  1. POControling how objects are displayed in a fluid grid
    primarykey
    data
    text
    <p>I have been using twitter bootstrap to design my homepage and something keeps bugging my mind about the usage of media queries in css frameworks such as twitter bootstrap.In my example i am displaying four images like</p> <pre><code>&lt;div class="container"&gt; &lt;div class="row"&gt; &lt;section&gt; &lt;article class="span3"&gt; &lt;img src="gandalf1.jpg" /&gt; &lt;/article&gt; &lt;article class="span3"&gt; &lt;img src="gandalf2.jpg" /&gt; &lt;/article&gt; &lt;article class="span3"&gt; &lt;img src="gandalf3.jpg" /&gt; &lt;/article&gt; &lt;article class="span3 last"&gt; &lt;img src="gandalf4.jpg" /&gt; &lt;/article&gt; &lt;/section&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>With the row class and basic resets for section,this works surprisingly well and it responds well down to mobile.I feel that i have no say on what's happening and so i want to get some control.</p> <p>What i want is to force everything under the <code>&lt;section&gt;&lt;/section&gt;</code> into some kind of contract to make them behave in some way,for instance,in my example at some point,the images are listed one after another vertically.</p> <p>In my contract for instance,i want the images to never leave their original order - (the original order is horizontal i.e one row with four images,the second row with four images and so forth) and should respond to the change of width by resizing without breaking out of their confines when the width is between 600px and 980px</p> <pre><code>@media screen and (min-width:600px) and (max-width:980px) { ... } </code></pre> <p>To achieve this,i have tried many things and the first thing i thought of is to make the <code>&lt;section&gt;</code> and <code>inline-block</code>,but that failed to produce the desired effect.I am afraid trying to redo the <code>.row</code> class will be a very tall order at those widths.</p> <p>Should i concentrate my efforts on looking for a solution using my css code i write or should i try and modify the <code>.row</code> class at those widths?.</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. 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