Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Building on @Jojje 's suggestion, the answer lies in creating an extra "inner" level (display:table) within the div structure. Solution is on CodePen here: <a href="http://codepen.io/Jaemaz/pen/spbKf" rel="nofollow">http://codepen.io/Jaemaz/pen/spbKf</a></p> <p>In case Codepen goes away, here is sample HTML and CSS:</p> <p><strong>HTML</strong></p> <pre class="lang-html prettyprint-override"><code>&lt;div class="focus-container"&gt; &lt;div class="focus-row"&gt; &lt;div class="inner"&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;ahem&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="focus-row"&gt; &lt;div class="inner"&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;hello&lt;/span&gt; &lt;/div&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;there&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="focus-row"&gt; &lt;div class="inner"&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;what&lt;/span&gt; &lt;/div&gt; &lt;div class="focus-element circle"&gt; &lt;span class="content"&gt;is&lt;/span&gt; &lt;/div&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;happening&lt;/span&gt; &lt;/div&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;happening&lt;/span&gt; &lt;/div&gt; &lt;div class="focus-element circle"&gt; &lt;span&gt;happening&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre class="lang-css prettyprint-override"><code>.focus-container { width: 560px; background-color: #000; padding: 5px; } .focus-container .focus-row { height: 110px; background-color: #000 } .focus-container .focus-row .inner { display: table; margin: 0 auto; height: 110px; } .focus-container .focus-row .inner .focus-element { float: left; text-align: center; margin: 0 auto; width: 94px; height: 94px; background-color: #009900; } .focus-container .focus-row .inner .focus-element span { margin-top: 40px; display: block; } .focus-container .focus-row .inner .circle { -moz-border-radius: 94px; -webkit-border-radius: 94px; border-radius: 94px; margin: 8px; </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. 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