0

I have tried unsuccessfully to create divs 100% but have not gotten round. Does anyone know how to do? I'm using border-radius command and setting the various values ​​mesmacom px and percentage but so far, nothing = / as you do this, create divs 100% round?

Elton da Costa
  • 1,279
  • 16
  • 27
  • possible duplicate of [Easier way to create circle div than using an image?](http://stackoverflow.com/questions/4840736/easier-way-to-create-circle-div-than-using-an-image) – Emond Aug 25 '13 at 11:57

2 Answers2

3

Actually, this is a better approach:

.round {
  height: 100px;
  width: 100px;
  border-radius: 50%;
}

Notice the use of a percentage as the border-radius. This way, you can just change the height/width and get bigger/smaller circles.

kumarharsh
  • 18,961
  • 8
  • 72
  • 100
0

You just make the border-radius half of the width and height.

div { height: 100px;
    width: 100px;
    border-radius: 50px;
}

Working example: http://jsfiddle.net/j7vD7/

frogatto
  • 28,539
  • 11
  • 83
  • 129
Valency
  • 107
  • 2
  • 8