Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curved corner border for a div

Tags:

html

css

I need to build a div with curved corner border, with out using any images in the corner. Is it possible?

I dont want to insert curved images in the corner, Please help me regarding this.

like image 579
praveenjayapal Avatar asked Dec 12 '08 06:12

praveenjayapal


People also ask

How do I round the corners of an image in CSS?

The border-radius CSS property is what adds the rounded corners. You can experiment with different values to get it the way you like. border-radius: 75px; If you want it to be a circle, add border-radius: 50%; .

How do I make a rounded corner table in HTML?

Use the CSS border-radius property to add rounded corners to the table cells.


2 Answers

If you want to rely on webkit and mozilla browsers, you can use the following css commands:

.radius {
-moz-border-radius: 6px;
-webkit-border-radius:6px;
border-radius: 6px;
    }

Details can be viewed here.

info on the CSS2 spec border-radius can be found here

These unfortunately do not work for ie.

you could go a javascript route for IE only by using niftycube which has the added benefit of supporting column height leveling without problems.

like image 192
jimg Avatar answered Sep 23 '22 15:09

jimg


http://www.curvycorners.net/

Try this library out, it did wonders for me! It is a tested cross browser solution.

like image 28
Derek P. Avatar answered Sep 25 '22 15:09

Derek P.