Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a div with a circular shape? [duplicate]

Tags:

css

css-shapes

i want to create a div with background color red and completely circular in shape

How can i do that?

Css or jquery both can be used

like image 409
Saswat Avatar asked Aug 12 '14 05:08

Saswat


2 Answers

You can do following

FIDDLE

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

CSS

#circle {
    width: 100px;
    height: 100px;
    background: red;
    -moz-border-radius: 50px;
    -webkit-border-radius: 50px;
    border-radius: 50px;
}

Other shape SOURCE

like image 167
Richa Avatar answered Oct 21 '22 07:10

Richa


By using a border-radius of 50% you can make a circle. Here is an example:

CSS:

#exampleCircle{
    width: 500px;
    height: 500px;
    background: red;
    border-radius: 50%;
}

HTML:

<div id = "exampleCircle"></div>
like image 23
Nirvik Baruah Avatar answered Oct 21 '22 09:10

Nirvik Baruah