Last Updated: February 25, 2016
·
1.911K
· gta5cheatsps3

Create a simple CSS circle

Creating a CSS circle is an easy to learn job for beginners. All the concept is that use same width and height in css and take the border-radius half of the width/height + border-width.

HTML part

<div id="circle"></div>

CSS part

#circle{
        width:100px;
        height:100px;
        background-color:#fa0;
        border-radius:60px;
        border-width:10px;
        border-style:solid;
        border-color:#056;
        }

3 Responses
Add your response

Demo: http://codepen.io/anon/pen/wCyHv
And another protip is to use the correct css selector #circle when targeting a div with the id circle :P

over 1 year ago ·

I made changes, thanks.

over 1 year ago ·
.circle {
  border-radius: 50%;
}

works fine.

over 1 year ago ·