Cross-browser CSS3 border-radius (rounded corners)
Currently there are multiple variations for creating a HTML elements with rounded corners. The simplest of these is the method that uses CSS3.
Fortunately almost all modern browser (FireFox, Safari, Chrome and Opera since 10.50 pre-alpha) supports CSS3 border-radius, but unfortunately none of a versions of Internet Explorer (even IE8) does not support this property.
I very long time was waiting for a moment, when I can safely use the border-radius property on my sites. And this moment has finally has come – now we can make rounded corners in Internet Explorer with his means. This method uses VML and behaviour.
border-radius for modern browsers
This is the way that works in all modern browsers (except IE8) like FireFox, Safari, Chrome and Opera since 10.50 pre-alpha:
.rounded-corners { -moz-border-radius: 10px; /* Firefox */ -webkit-border-radius: 10px; /* Safari, Chrome */ border-radius: 10px; /* CSS3 */ }
border-radius for Internet Explorer
Download the border-radius.htc file, put it in the same place where your CSS file, and then use this CSS code:
.rounded-corners { behavior: url(border-radius.htc); }
I think it’s better to put this CSS in a separate file and connect it using conditional comments:
<!--[if IE]><link rel="stylesheet" href="ie.css" type="text/css" media="screen, projection" /><![endif]-->Demo
Download crossb-rowser border-radius demo.
Another nice looking solution to fix IE is CurvyCorners:
http://www.curvycorners.net/
Been using it for a while and it’s easy to use and looks great.
Good solution, but it have one minus – this is a script file size (28 Kb). Script, which i described in my post is only 5 Kb.
Thank you for this…
Can you help me to find a resource for CSS 3.0, and how can I use it because actually I can learn css 2.0
Very good site about CSS3 is css3.info. Through the Google you may find many blogs that write about CSS3.
Oh… thank you very much.
I want to learn so things about web developer because I haven’t any trips about it. just windows developper….
thank you again
This link must be very useful for you – http://aext.net/2010/01/10-best-tutorials-to-learn-css3/
Thank you very much… When I finish my lessons about windows developer I will start on Web Developer and If I have any problems I will call you.