Tuesday, September 23, 2008

Border-radius: create rounded corners with CSS!

W3C has offered some new options for borders in CSS3, of which one is border-radius. Both Mozila/Firefox and Safari 3 have implemented this function, which allows you to create round corners on box-items.
<div style=" background-color: #ccc;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #000;
padding: 10px;" >
More info: http://www.css3.info/preview/rounded-border/

But it doesn't work in IE. Anybody has any solution? Can anyone give me code which will work across all the browsers? Please help.

1 comment:

  1. The Curvy Corners jQuery plugin might be what you're after:

    http://blue-anvil.com/jquerycurvycorners/test.html

    It really depends on what your audience is. If you're developing a mass-market consumer site then proper support for IE6/7 is probably important. On the other hand, if your audience is, say, the open source programming community, then it may be acceptable to simply degrade to square corners for the (likely) smaller number of users that will view the site in IE. In fact, even Twitter have taken that approach with their latest re-alignment.

    Alex

    ReplyDelete