How to make a rounded div

How do you make the div so that the border angles are rounded?

Thanks everyone!

+7
source share
5 answers

Here he is:

<style type="text/css"> div.test { width: 115px; padding: 10px; border: 2px solid #000; border-radius: 15px; -moz-border-radius: 15px; } </style> <div class="test">This is some text!</div> 

-SilverHorn

+6
source

With CSS, add the code: border-radius: 10px .

I use 10px for example, but you can experiment with the number of pixels you like.

+2
source

Use the border-radius property. The higher the indicated amount (usually in px ), the more your figure is rounded. Example:

 myDiv { border-radius:30px;} 

Hope this helps.

+1
source

for example using css 3 here is an example

0
source

add this css:

 border-top-right-radius:15px; border-top-left-radius:15px; border-bottom-right-radius:15px; border-bottom-left-radius:15px; 
0
source

All Articles