Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Shorter Code</h2> <p>This solution reduces your code size but keeps the functionality in place. I've kept the original <code>.x#</code>, eliminating the <code>.x0</code>, <code>.x3</code>, and <code>.x6</code> that were not needed. So in a final solution, you would probably renumber (but I wanted you to see what was eliminated).</p> <p>Any of your pieces "splitting" the circle that require a different <code>top</code> or <code>left</code> setting will need to have a selector that meets or exceeds the <code>.x2 &gt; div</code> selector to override, hence why I have <code>.x2 &gt; .x7</code> etc. for some of my selectors.</p> <p>(As noted in the comments below, <a href="https://stackoverflow.com/questions/5736503/how-to-make-css3-rounded-corners-hide-overflow-in-chrome-opera">Chrome has bug issues</a> with the original technique the OP had posted at the time of the bounty starting. This does not solve those, so view the following in another browser.)</p> <h2><a href="http://jsfiddle.net/WTWrB/9/" rel="nofollow noreferrer">Here's the modified fiddle.</a></h2> <p><strong>HTML</strong></p> <pre><code>&lt;div class="x1"&gt; &lt;div class="x2"&gt; &lt;!-- BEG Content --&gt; &lt;div class="x4"&gt; dude &lt;/div&gt; &lt;div class="x7"&gt; dude &lt;/div&gt; &lt;div class="x8"&gt; dude &lt;/div&gt; &lt;div class="x5"&gt; dude &lt;/div&gt; &lt;!-- END Content --&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; </code></pre> <p><strong>CSS</strong></p> <pre class="lang-css prettyprint-override"><code>.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; } /* BEG Content */ .x2 &gt; div { position: absolute; text-align: center; top: 0; left: 0; } .x4,.x5 { width:100%; height: 20%; } .x2 &gt; .x7, .x2 &gt; .x8 { width:50%; height: 60%; top: 20%; } .x4 { background-color:blue; } .x2 &gt; .x5 { background-color:yellow; top: 80%; } .x7 { background-color:green; } .x2 &gt; .x8 { background-color:orange; left: 50%; } /* END Content */ @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%;} } </code></pre> <p><strong>EDIT:</strong> Based on comments, it appears the OP desired something more like <strong><a href="http://jsfiddle.net/WTWrB/23/" rel="nofollow noreferrer">the control this fiddle offers</a></strong> (not functional in Chrome; the OP has not at the time of this edit replied for me to know if that is the type of functionality desired or not).</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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