Individual Rounded Corners

Most developers are familiar with the CSS3 rounded corners syntax. But how would you go about setting different values for each of the corners? Save this code snippet and you should never run into the problem again! I’ve included both a condensed version and a longer base with each corner radius broken down into a different property.

Individual Rounded Corners

1. #container {
2. -webkit-border-radius: 4px 3px 6px 10px;
3. -moz-border-radius: 4px 3px 6px 10px;
4. -o-border-radius: 4px 3px 6px 10px;
5. border-radius: 4px 3px 6px 10px;
6. }
8. /* alternative syntax broken into each line */
9. #container {
10. -webkit-border-top-left-radius: 4px;
11. -webkit-border-top-rightright-radius: 3px;
12. -webkit-border-bottom-rightright-radius: 6px;
13. -webkit-border-bottom-left-radius: 10px;
15. -moz-border-radius-topleft: 4px;
16. -moz-border-radius-topright: 3px;
17. -moz-border-radius-bottomright: 6px;
18. -moz-border-radius-bottomleft: 10px;
19. }

Got Something To Say: