After taking a look on how round corners on some browsers, I think it’s worth exploring other methods, like doing this with javascript.
Rounding corners is not difficult, in general, the problem is that you should use some “hacks”, it is not the same rounding corners using a style on a unique DIV, than using 3 DIVS or create a TABLE with background images in order to emulate this effect.
Unfortunately, as the Internet Explorer (even version 6) is still widely used, doing what I’ve explained on the previous post is not a good practice at all.
Anyway, for practical use, as I’ve said before, there are other easy methods to let people see rounded corners no matter its race, gender, religion, operating system or browser. One of this methods is using javascript libraries for rounding corners easily. Fortunately, the web is full of javascript libraries, and rounding corners was once an important topic, so let’s see some options:
- Nifty Corners, and the latest version, Nifty Corners Cube: this was the first widely used solution, it received very good reviews by the time
- jQuery corner plugin, created by Dave Methvin: here you could see a demo using all the parameters. After some time this plugin was updated by Mike Alsup who included even more conrer types (taking a look to this demo to see all available corners).
- JRC is another plugin for jQuery I’ve found on the internet, following this link you could see a demo
- MochiKit comes with native support for rounded corners as you could see on this example, somehow is very limited but enough for some purposes
- OpenRico also supports rounded corners natively
Finally, if you do not intend to use javascript for rounding corners (because you are looking for something more sofisticated, or you don’t like doing this kind of things by javascript), then take a look at this article about 25 techniques for rounding corners using CSS
Update: I’ve found ShadedBorder which looks great, and I think this is the one I’m going to use.
Español
4 Comments on "Rounding corners: the javascript way"