Note that there are some explanatory texts on larger screens.

plurals
  1. POdraw circles using border radius
    primarykey
    data
    text
    <p>I'm trying to convert some divs, using border radius. I almost obtain it, but sometimes divs look like 'eggs' haha This is my css:</p> <pre><code>#div{ /*div central*/ position:absolute; top:50%; margin-top: -20%; left:50%; margin-left: -20%; background: #00A8D9; width: 40%; height: 40%; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; border:3px solid #000; } #divSupIzq,#divSupDer,#divInfIzq,#divInfDer{ /*DIVs: left-top , right-top, left-bottom, right-bottom*/ background: #ddd; width: 20%; height: 20%; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; border:3px solid #fff; position:absolute; } #divSupIzq{ /*Div left-top*/ top:15%; left:10%; } #divSupDer{ /*Div right-top*/ top:15%; right:10%; } #divInfIzq{ /*Div left-bottom*/ bottom:15%; left:10%; } #divInfDer{ /*Div right-bottom*/ bottom:15%; right:10%; } </code></pre> <p>And in html, I use javascript / jQuery in order to change the content of each div (basically text in divs: left-top,right-top, left-bottom, right-bottom ; and number in central div) on depending of the size of each div:</p> <pre><code>$('#div').resize(function(height){ var fuente = $(this).height()/2; var margen = (fuente / 2)-5; $('.contenido').css('font-size',fuente+'px'); $('.contenido').css('margin-top',margen+'px'); }); </code></pre> <p>This is how I see in Ripple extension of chrome: <a href="https://www.dropbox.com/s/k71kz5lahfolw95/screen.JPG" rel="nofollow">https://www.dropbox.com/s/k71kz5lahfolw95/screen.JPG</a></p> <p><strong>Can you help me in order to divs are always circles, and not eggs?</strong> Thanks in advance, Daniel</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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