Fun with CSS

Round Corners

The border-radius property is one of those CSS techniques that has been experimental for a few of the last releases of CSS.

It is now supported by the latest versions of all major browsers.

You can use it with or without adding a border to your page element.

You can use it on all or selected corners.

Use ems or pixels for the value of the radius.


Code and Examples

All 4 Corners

border-radius: 10px



Top corners

border-radius: 20px 20px 0 0



Bottom corners

border-radius: 0 0 30px 30px



No Border with Inset Box shadow

border-radius: 25px; box-shadow: 5px 5px 10px #0e0e0e inset



See Also: Box Shadow