Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I didn't manage to achieve what you specified even after numerous tries with the FlexBox model. (BTW: this model is currently poorly supported by browsers)</p> <p>But, in my efforts, I came with a decent solution, maybe you'll like it too.</p> <p><a href="http://jsfiddle.net/avrahamcool/47seG/1/" rel="nofollow"><strong>Demo in this Fiddle</strong></a></p> <p>I've manage to evenly distribute the space between the elements in <strong>each row</strong>, while allowing element wrapping. each element get the exact amount of space he needs, and the rest is divided as spaces <strong>within the row</strong>.</p> <p>but, this width remain even when elements wrap. so you don't have the 'Column like' display.</p> <p>this is pure CSS, and cross Browser. <em>Tested on:</em> IE10, IE9, IE8, Chrome, FF</p> <p><strong>HTML</strong></p> <pre><code>&lt;div class="wrap"&gt; &lt;div class="pair"&gt; &lt;p&gt;a&lt;/p&gt; &lt;p&gt;b&lt;/p&gt; &lt;/div&gt; &lt;div class="pair"&gt; &lt;p&gt;cccccccc&lt;/p&gt; &lt;p&gt;dddddd&lt;/p&gt; &lt;/div&gt; &lt;div class="pair"&gt; &lt;p&gt;ee&lt;/p&gt; &lt;p&gt;f&lt;/p&gt; &lt;/div&gt; &lt;div class="pair"&gt; &lt;p&gt;ggggggggggg&lt;/p&gt; &lt;p&gt;hhhhhhhhh&lt;/p&gt; &lt;/div&gt; &lt;div class="pair"&gt; &lt;p&gt;iiii&lt;/p&gt; &lt;p&gt;jjjjjj&lt;/p&gt; &lt;/div&gt; &lt;div class="filler"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>* { padding: 0; margin: 0; } .wrap { background-color: #ccc; line-height: 0; text-align: justify; } .pair { line-height: normal; background-color: #ddd; display: inline-block; width: auto; } .filler { width: 100%; height: 0; font-size: 0; display: inline-block; vertical-align: top; } </code></pre>
    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.
    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