Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h2>Solution:</h2> <p><a href="http://jsfiddle.net/WTWrB/" rel="nofollow noreferrer">http://jsfiddle.net/WTWrB/</a></p> <p><strong>The DIV structure:</strong></p> <p><em>We use <code>overflow:hidden</code> in <code>.x2</code> for spill off background colors in <code>.x3</code> of child elements.</em></p> <p><em>Notice the content starts inside of <code>.x3</code></em></p> <pre><code>&lt;div class="x0"&gt; &lt;div class="x1"&gt; &lt;div class="x2"&gt; &lt;div class="x3"&gt; &lt;!-- BEG Content --&gt; &lt;div class="x4"&gt; dude &lt;/div&gt; &lt;div class="x6"&gt; &lt;div class="x7"&gt; dude &lt;/div&gt; &lt;div class="x8"&gt; dude &lt;/div&gt; &lt;/div&gt; &lt;div class="x5"&gt; dude &lt;/div&gt; &lt;!-- END Content --&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="x2"&gt;&lt;/div&gt; &lt;div class="x2"&gt;&lt;/div&gt; &lt;div class="x2"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>The CSS:</strong></p> <pre><code>@media (max-width: 320px) { .x2 {padding: 50%;} } @media (min-width: 321px) and (max-width: 800px) { .x2 {padding: 25%;} } @media (min-width: 801px) { .x1 {width:800px} .x2 {padding: 12.5%;} } .x0 { float:left; width:100%; } .x1 { margin:0px auto; } .x2 { overflow:hidden; display:block; float:left; width:auto; height:auto; position: relative; border-radius:50%; -moz-border-radius:50%; -webkit-border-radius:50%; -khtml-border-radius: 50%; background:#eee; } .x3 { position: absolute; width: 100%; left: 0; top:0; font-size: 100%; float:left; height:100%; background-color:red; } /* BEG Content */ .x3 div{float:left;} .x4,.x5,.x6 { width:100%; } .x7,.x8 { width:50%; float:left; height:100%; } .x4,.x5,.x7,.x8 { text-align:center; } .x4 { background-color:blue; height:20%; } .x5 { background-color:yellow; height:20%; } .x6 { height:60%; } .x7 { background-color:green; } .x8 { background-color:orange; } /* END Content */ </code></pre> <p><img src="https://i.stack.imgur.com/wiq9n.png" alt="Responsive CSS Circles"></p>
 

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