Note: This post is continually updated as I come across new techniques.
This collection of techniques to create boxes with rounded corners using CSS has become quite popular. The problem now is there are so many choices it's hard to know which one to choose.
To that end I've provided some more information about each method in order to help people choose which best fits their needs.
Some of these techniques use CSS and one or more background images, some use CSS, JavaScript and no images, and a couple use only CSS — no images or JavaScript required (more markup is needed though).
There are so many different techniques now, it really depends on your individual requirements and preferences; particularly whether you want to use a JavaScript-based technique or not.
Try out a few methods and see if there's one that fits. For convenience I've split the methods into two tables:
Click on a column heading to sort the table by that column.
| Name | # of Images | Fixed / Liquid | Site / Comments |
|---|---|---|---|
| Simple CSS3 rounded corners with support for IE | 0 | Liquid | Uses CSS3 and uses images for IE |
| Karate Corners | 1 | Liquid | Kyle Schaeffer |
| Even More Rounded Corners With CSS | 1 | Liquid | HedgerWow |
| Even More Rounded Corners With CSS | 1 | Liquid | Schillmania.com |
| CSS Mojo: Adding Visual Polish To Your Pages | 1 | Liquid | Leslie Sommer |
| CSS Round Corners | 0 | Fixed / Liquid | Gran Yosler. Limited flexibility. |
| Single Image Fluid/Fixed Rounded Bordered Corners walkthrough | 1 | Fixed / Liquid | CASS-Hacks |
| ORB | Fluid CSS One Image Round Borders | 1 | Liquid | Daniel Tillett |
| Rounded Corners for Fixed width | 2 | Fixed | Daniel Bulli |
| Curved boxes in CSS | 2 | Fixed | Includes CSS3 example |
| Chunky Borders and corners with no images | 0 | Fixed / Liquid | Uses no images |
| Lean and Clean CSS boxes | 2 | Fixed | TJKDesign |
| PNG transparency rounded corners using images | 7 | Liquid | Uses PNG images |
| CSS Liquid Round Corners | 6 | Fixed / Liquid | Search-This |
| RoundedCornr | 4 | Fixed / Liquid | Online generator |
| More Rounded Corners with CSS | 6 | Liquid | Schillmania |
| Spanky Corners | 4 | Liquid | SitePoint. Online generator |
| Mountaintop Corners | 2 | Fixed | A List Apart. Uses definition list |
| Custom Corners & Borders: Part I | 5 | Liquid | A List Apart. For solid backgrounds |
| Custom Corners & Borders: Part II | 5 | Liquid | A List Apart. For gradient backgrounds |
| Spiffy Box | 1 | Fixed | SpiffyBox. Online generator based on Thrash Box |
| Graphik Junkie | 3 | Fixed | Graphik Junkie |
| Single Image Rounded Corners | 1 | Fixed / Liquid | Phoenity |
| Custom Corners | 3 | Fixed | Interface-7 |
| Bullet Proof Rounded Corners | 4 | Liquid | Albin.Net. Images added via HTML not CSS |
| Rounded Corners in CSS | 4 | Fixed | Adam Kalsey |
| CSS teaser box | 1 | Fixed | 456 Berea Street |
| CSS teaser box revisited | 2 | Liquid | 456 Berea Street |
| News list | 1 or 2 | Fixed | 456 Berea Street |
| CSS Rounded Box Generator | 5 | Fixed | Neurotic Web. Online generator |
| Round Corners | 3 or 6 | Fixed or Liquid | Sova v siti. Liquid box uses 8 divs |
| Rounded corners using CSS | 4 | Liquid | Maurice Svay |
| Simple Box | 8 | Fixed / Liquid | Sperling Corporation |
| Custom Bordered Boxes | 1 or 2 | Fixed / Liquid | Steve Clay. Includes Fireworks source file |
| Liquid box with rounded corners | 4 | Liquid | Guy Fisher |
| Borders with curves | 5 | Fixed | Webcredible |
| Boxes with curves | 4 | Fixed | Webcredible |
| Resizable box with freely stylable corners & surface | 4 | Liquid | Andreas Kalt |
| Rounded corners in CSS | 4 | Liquid | Arve Bersvendsen. Does not work in IE |
| Broader Border Corners | 4 | Liquid | 24 Ways |
| Liquid round corners | 4 | Liquid | Tiscali |
| CSS: Smart Corners | 4 | Liquid | Mike Cherim |
| Add Fluid Borders to Your Boxes with CSS | 0 | Fixed | WebReference |
| Snazzy Borders | 0 | Fixed / Liquid | CSS Play |
| Spiffy Corners | 0 | Fixed / Liquid | Spiffy Corners. Online generator |
| Name | # of Images | Fixed / Liquid | Site / Comments |
|---|---|---|---|
| jQuery Rounded Corners | 0 | Liquid | Requires jQuery. Can style buttons and links. |
| Corner.js | 0 | Fixed | Multiple effects including borders. |
| Anti-aliased Rounded corners with JQuery | 0 | Fixed / Liquid | Blue anvil.JQuery version of Curvy Corners. |
| ShadedBorder | 0 | Fixed / Liquid | Drop shadows & other effects. |
| Transcorners | 0 | Fixed | Mooforum.net |
| Sweet Rounded Corners | 1 | Liquid | Allcrunchy.com. Online generator |
| Transparent Custom Corners and Borders | 2 | Fixed | 456 Berea Street |
| Customising custom corners and borders | 2 | Liquid | 456 Berea Street |
| curvyCorners | 0 | Fixed / Liquid | Curvy Corners. Support forum; mailing list |
| Nifty Corners Cube | 0 | Fixed / Liquid | HTML.it. 13 examples |
| Rico – Javascript Rounded Corners | 0 | Fixed | Rico |
| Rounded Corners With CSS and JavaScript | 0 | Fixed | Dev Articles |
| Rounded Corners with CSS and JavaScript | 4 | Fixed | SitePoint |
| MochiKit Rounded Corners | 0 | Liquid | Mochikit |
| Octopus Engine | 8 | Liquid | Dragon Labs. Source package includes PSDs |
| Anti-aliased Nifty Corners | 0 | Liquid | Steven Wittens |
If I've missed any techniques or got any of my facts wrong, please let me know.
Posted on: October 11, 2006 | 65 Comments



65 Comments Posted
That's quite a list, Christian. Very useful. I attempted this CSS rounded corners thing quite awhile back and ended up sticking to a perfect 90 degree corner. But, with your list, I'm sure I'll find a method that will convert me to a CSS rounded corner addict ;o).
1. Posted by Bina on November 25, 2005
Thanks Bina. I've used the 'Mountaintop corners' technique on this site and the 'Thrashbox' method on this site .
However, that was before I became aware of the CSS/JavaScript method which seems to be so much easier. Given the choice now, I would definitely use one of these instead.
2. Posted by Christian Watson on November 26, 2005
Hi Christian,
In addition: I didn't know the existance of this list, otherwise I wouldn't have spent so much time in developing my own model, I guess!
Tired of Googlin' and not finding a solution for my needs ("universal scriptless transparent liquid 1 image solution"), I decided to do it myself and to combine some css-techniques.
Result was the article/tutorial "Liquid Round Corners", together with a "Liquid Corners Playgarden" for a handfull of examples.
francky
Note: After I finished the job, I discovered the Bereastreet pages: a model with pretty much ressemblance. - We should empty Google, and save only the good pages... ;-)
3. Posted by francky on January 21, 2006
Franky - thanks for the link. I've added it to the list. Nice job with the step-by-step tutorial too!
4. Posted by Christian Watson on January 22, 2006
I noticed the list didn't mention Steven Wittens' take on Nifty corners, he's sprinkled anti-aliasing into the mix:
http://www.acko.net/files/nifty-aa.html
5. Posted by TBF on March 11, 2006
Hey, just wanted to let you know that I updated the ThrashBox technique (ughhh... hate that name) on my blog at MODx CMS ... Now it only takes a single image and I'm working on a version that allows for transparent PNG drop shadows including working in IE lte 7.
6. Posted by Ryan Thrash on March 23, 2006
Hi,
I have this page bookmarked. Great resource!
May want to look at the "new & improved" Nify Corners.
"There are several improvements and new features introduced in Nifty Corners Cube which make it more versatile and simpler to use than the previous versions ..."
http://pro.html.it/niftycube/
7. Posted by Terry on March 24, 2006
I have a picture and I want to get this picture with rounded corners by using css? How to realize that?
8. Posted by jam on March 27, 2006
jam - that's an interesting question. I imagine that you would need to use one of the Javascript-based techniques, such as Nifty Corners.
If you set your image as the background image for the div to be rounded, as well as declaring the background color, you should get the effect you're looking for. E.g.:
div#rounded {background: #ffffcc url(image.jpg) top left no-repeat;}I don't recall seeing an example before, so let me know if it actually works!
9. Posted by Christian Watson on March 27, 2006
I'll try it with NiftyCorners. Actually this is a new challenge for CSSors :)
10. Posted by jam on March 27, 2006
unfortunatly, this is not a solution. :(
11. Posted by jam on March 27, 2006
See if example 3 in new Nifty Corners works. It uses a background image.
http://pro.html.it/niftycube/
12. Posted by Terry on March 28, 2006
Thanks, Christian. Some of them will definitely be added to the Web Developer's Handbook. ;)
13. Posted by Vitaly Friedman on April 13, 2006
Another one without images required is http://www.phpmyborder.com
14. Posted by Jagg on April 14, 2006
Does anyone know which technique http://www.mozilla.com/ uses? The HTML looks pretty clean there, but I could use some instructions and explanation.
15. Posted by LR on May 12, 2006
Hi, I am trying css. I have used nifty cube and I already have check some basic tutorials, but I have some problems and dont have much idea:
How can I add Java script into a div (wich is rounded with ninfty cube) like a scroll, without affect the design? - when I do this, the design is lost, I mean, the border and the round corners.
Other: I have problems with div border. When I add a a or hx tag, the div border is broken, a border part is no more continuos at a or hx level?
Some suggestion? may be a reading o tutorial
Thnks!
16. Posted by ale on July 28, 2006
How about transcorners?
http://inviz.ru/moo/transcorners/
17. Posted by Inviz on October 12, 2006
Great List, thank you :)
18. Posted by Praveen on October 12, 2006
nice comprehensive list, but this makes it even harder for me to choose! Some comments on portability, effect on validation/accessibility and degradation across different browsers (including text-only or screen readers) would be useful. Also how applicable the styles are to print layout ... it seems rounded corners are one of those areas designers are prepared/have to break the web, and this shouldn't be neccessary. Also, what's the advantage of using a single image? Especially in the presence of extra complicated and unportable Javascript/CSS code to make the corners look right it seems to me a flawed tradeoff.
19. Posted by anon on October 12, 2006
schiller corners: http://www.schillmania.com/content/entries/2006/04/more-rounded-corners/
20. Posted by Johan on October 13, 2006
Thanks for this informative list, very useful, mentioned you in the read of the day.
21. Posted by milo317 on October 14, 2006
actually, airtight corner is fluid, and shouldn't break on text resize. also, it only requires one image for all corners.
22. Posted by evan on October 16, 2006
Inviz – added!
anon – choosing the right technique is definitely the challenge now. Your suggestions are good ones; however, it's unlikely that I'll ever find time to implement them — sorry.
Johan – added!
evan – thanks for the corrections. However, in the example, when I resize my text in Firefox I see an extra part of the image below the bottom right corner of the rounded box. That's why I said that it breaks.
23. Posted by Christian Watson on October 16, 2006
Great resources, its a very useful information.
Greetings from Chile!!!!
24. Posted by sergio on October 17, 2006
Thank you for this list. This was very helpful to me.
I personally can recommend the last three links. In my opinion they are outstanding.
I don't like the approaches with images and/or javascript. Using only CSS and HTML is the a very good way.
25. Posted by Johannes on October 18, 2006
In the list, "Customising custom corners and borders" from 456 Berea Street is shown to not use Javascript, however it does use script to modify the DOM.
26. Posted by James Cook on October 23, 2006
While really being thankful for this list (a novice in this and almost only knew about nifty) - I don't want to sound like complaining - cause I am not - but if you ever update this list - an extra column for dependencies (for example prototype, none etc) would be pretty useful.
27. Posted by Stefan Holmberg on October 24, 2006
here's one that isn't on your list.
http://www.ruzee.com/blog/ruzeeborders/
i'd also politely suggest a ratings or performance/speed column for the list.
cheers.
28. Posted by wschmenge on November 25, 2006
Rounded Corners With CSS and JavaScript does actualy use 4 images. Right?
4 divs and background images.
29. Posted by Dodji on December 05, 2006
A great list, particularly your willingness to go to the trouble of trying to sort out which would be most useful for a given situation, not to mention the fact that you’ve created a pop-up that tells how many clicks each has received today, which gives me an idea of which seem to be most useful to other people. What strikes me, though, is how many different options there are out there. Every time I think that I’ve got to a level of basic understanding with web page design, think I am beginning to feel some mastery, I come across something like this that reminds me just how much is out there that I still don’t know about. It can feel quite discouraging sometimes, despite the fact that what it ultimately demonstrates is that there is so much freedom to be had in the age of the internet.
30. Posted by linen on July 17, 2007
linen — I feel like that a lot too, so don't be disheartened! A couple of years back I wrote a post about having faith in yourself as a web designer which still rings true today.
If you can master the basics of SEO-friendly, accessible, semantic, CSS-driven web page design you will be better than 70+% of people working in this industry, many of whom have been working in it for years!
31. Posted by Christian Watson on July 19, 2007
Another method, single image fulling floating or fixed and supports any kind of container positioning, e.g. float, absolute, relative, static.
One can also keep one's transmitted markup clean by using Javascript on the client side to add the elements needed to the DOM.
A demo (w/o Javascript) page is at
http://cass-hacks.com/articles/example/css_borders_corners/
A demo (with Javascript) page is at
http://cass-hacks.com/articles/example/css_borders_corners/javascript/
A walk-through as to how it works is at http://cass-hacks.com/articles/code/css_borders_corners/
Hope people find it useful.
32. Posted by Craig on July 24, 2007
Thanks for sharing this list Christian. I’m teaching kids young adults CSS and your list has become my test/exercise/activity list for them.
By the way, do you have any idea as to how to make a collapsible table through CSS?
33. Posted by Portrait artist on August 02, 2007
ThanX, Christian, for a very useful list. I use now only "Spiffy Box" for the creation of the rounded corners; this is a nice and simple online generator.
P.S: Link to the "Single Image Rounded Corners" ( http://www.quinncrowley.com/rounded.htm ) is an expired domain...
34. Posted by Leo on August 02, 2007
In the list, "Customising custom corners and borders" from 456 Berea Street is shown to not use Javascript, however it does use script to modify the DOM.
35. Posted by gry on August 03, 2007
Great list ! It was very usefull. I used it at my website: motoryzacja. I recomended your site to my friends. Thanks !.
36. Posted by John on August 08, 2007
Thank you for this list. This was very helpful to me.I personally can recommend the last three links. In my opinion they are outstanding.
37. Posted by Frenk on August 11, 2007
Thanks for this great info! I loved the Spiffy Corners Online generator. Very usefull, a great tool! No images or javascript needed...
Thanks, once again!
38. Posted by Ricardo Correia on August 11, 2007
DOM elements. Was there a reason specifically or some obvious constraint I’m missing? Also, any idea on what document.matchAll() will return in the next generation of browsers? Thanks for the library, we need more devs with your approach.
39. Posted by Artur on August 12, 2007
I have a picture and I want to get this picture with rounded corners by using css? How to realize that
40. Posted by kursy i szkolenia on August 29, 2007
I noticed the list didn't mention Steven Wittens' take on Nifty corners, he's sprinkled anti-aliasing into the mix:
41. Posted by fttp on September 01, 2007
Hi Christian,
Very nice collection of techniques. Here is another javascript technique for creating rounded corners:
http://www.dhtmlgoodies.com/index.html?whichScript=rounded-corners
A demo is here:
http://www.dhtmlgoodies.com/scripts/rounded-corners/rounded-corners.html
42. Posted by peter on September 09, 2007
That is one long list very nice job. The spiffy corners have to be one of my favorite.
[email protected],
http://www.mifdesign.com
43. Posted by Roman on September 10, 2007
Thank you v.much for this mazing table. It is a really good reference. I hope you keep updating it 4ever :)
I've used nifty corners & I like them so far :)
تصميم المواقع
44. Posted by تصميم مواقع on September 11, 2007
Great tutorial ;)
Here it is a full CSS based one that does same thing: Fully Css Rounded Corners
45. Posted by Claude on September 11, 2007
Thanks a lot!
This is very useful tutorial.I will use it in my future projects
46. Posted by Mike on September 12, 2007
Note: After I finished the job, I discovered the Bereastreet pages: a model with pretty much ressemblance. - We should empty Google, and save only the good pages.
47. Posted by skun on September 13, 2007
I've gone through all of the liquid border methods on this page but none of them seem to do what i want it too. (unless i missed something when i was looking through them.
What i need is is to have content right up against the curved border. e.g. an image in the top right corner of a rounded box would have some of the image corner hidden by the border.
the closest thing I've seen to this is using Curvey corners but it's using a background image.
Padding/positioning is also a problem in a lot of methods.
i want a double border consisting of 2 DIVs, the first (outer) has 1px padding.
the method by Kae Verens is the closest i have to getting this to work.
I'll check back on this page in the future to see if any updates could solve these issues.
48. Posted by smash_pants on September 20, 2007
Thank you!! i been looking for a way to add rounded borders without using images.
One thing i can't work out is how to add borders around text but the title stops the border at the start of the title to the end of it.
49. Posted by Adrian on October 02, 2007
Thanks, Christian. Some of them will definitely be added to the Web Developer's Handbook. !
50. Posted by grafika on October 07, 2007
Thanks for the link ... great list !
51. Posted by Daniel on October 09, 2007
yeah love this list of round corner unfortunately i found it a day too late and have developed my own doh! but one thing i did think about (if/when you have time) is to add a rating so peeps can rate each box type i saw it working very well on a site http://www.cocktailbuilder.com/ hes using nifty too ;)
52. Posted by Ben on October 11, 2007
Nice compilation of the resources.
Thanks for taking time to put them together.
regards.
53. Posted by Zaigham on October 13, 2007
Great resources, its a very useful information.
Greetings from Chile!!!
54. Posted by kol on October 15, 2007
I have a picture and I want to get this picture with rounded corners by using css? How to realize that
55. Posted by porki on October 15, 2007
I used Smart Corners in my web cd druck. I must sey Thanks for sharing because I was searching for this last few days. There is a problem with positioning like someone said before. Everyone have own method for this but we are wainting for new solutions.
Thanks
Anna Ruck
56. Posted by Anna Ruck on October 15, 2007
DomCorners only uses one image. The layouts presented in that technique use multiple images because each sample box is a different color.
57. Posted by James Byers on October 19, 2007
Good article and very useful information.
Thanks.
Borgan
58. Posted by Katalog on October 22, 2007
Really interesting article and useful informations! Best regarts from Germany send Handball!
59. Posted by Handball on October 25, 2007
I have just developed NiftyDotNet, an ASP.NET wrapper for the excellent library Nifty Corners Cube. It is a component that encapsulates all the files and logic needed, so developers can use it just dragging and dropping on their webforms.
Due it is based on Nifty Corners, everything you've said here is valid.
It is distributed as open source, and you can find it in http://code.google.com/p/niftydotnet.
60. Posted by J. M. Aguilar on October 29, 2007
Thank you very much for the list. I have been looking for how to create the rounded corners in my web application, I'm so glad to have it done finally by your list.
61. Posted by kaka on November 02, 2007
Wow. I was looking for css corners .. but this list is so huge i have to take two days off work to go through all of them. Thanks a lot!
62. Posted by Andre on November 14, 2007
Hi,
First of all, thanks for the great collection of rounded corners.
I had a look at the chunky Borders ,and they look interesting but I didn't find nothing on that website relating to the method to obtain the boxes.Maybe do we have to pay for it?
If I didn't see the link and somebody knows where to look,please tell me.
Cheers
joe
63. Posted by joe p on November 14, 2007
I have just developed NiftyDotNet, an ASP.NET wrapper for the excellent library Nifty Corners Cube. It is a component that encapsulates all the files and logic needed, so developers can use it just dragging and dropping on their webforms.
64. Posted by Hip Hop Klamotten on November 22, 2007
Hmm,
It might be good to put forward the very basics about rounded borders:
-- There is no "good" way to do them.
The rounding of borders should simply be option in CSS but it isn't. Instead all these effects involve simulating rounding with images or little divs. You either have to use an image and transparency effects (messy) or you have to use a lot of divs, generated either by your server or by javascript. One or another of these methods may suit someone's style but none involve programming elegance, none of these are really in the spirit of CSS (easily change the look of your site by just a single entry in your CSS).
Thought it should be said for those who are just starting with this stuff.
J
65. Posted by hjsolbrig on November 30, 2007