CSS label 3 Tour: Border Radius
Border-radius allows you to create rounded corners with just CSS without the need for graphics or JavaScript. If you are not using it yet here’s an explanation.
Rounded Corners
Historically rounded corners were tricky to implement involving a background graphic or even JavaScript. Interface designers would issue a little sigh as designers littered designs with rounded corners. Well not any more!
Corners for all
Now you can create rounds corners easily using CSS. There is a bit of variance between browser vendors at the moment but I imagine eventually the syntax will standardise. To add rounded corners you just need:
/* Gecko browsers */
-moz-border-radius: 5px;
/* Webkit browsers */
-webkit-border-radius: 5px;
/* W3C syntax - likely to be standard so use for future proofing */
border-radius:10px;
-moz-border-radius: 5px;
/* Webkit browsers */
-webkit-border-radius: 5px;
/* W3C syntax - likely to be standard so use for future proofing */
border-radius:10px;

/* Gecko browsers */
-moz-border-radius-topleft: 20px;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 20px;
/* Webkit browsers */
-webkit-border-top-left-radius: 20px;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 20px;
/* W3C syntax */
border-top-left-radius: 20px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 20px;
-moz-border-radius-topleft: 20px;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 20px; /* Webkit browsers */
-webkit-border-top-left-radius: 20px;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 20px; /* W3C syntax */
border-top-left-radius: 20px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 20px;

Border-radius is supported in Firefox 2 & 3, Safari 3 and related Gecko and Webkit browsers.
Internet Explorer 6 & 7 and 8 (as far as I know) and Opera do not support rounded corners. Instead these users will see a regular corner.
Filed under: CSS Tutorial | 1 Comment
Tags: CSS design, CSS Tutorial, CSS3 Border Radius
Search
-
Blogroll
- All About Hosting
- Amrit Ray
- Anupam on blogspot
- Anupam on wordpress
- Aparna on Blogspot
- Aparna on Tumblr
- Aparna on Wordpress
- Aparna Pramanik
- Business Directory
- Creative Designer
- Delhi Hosting
- Design Stuff
- HostingITrust on blogspot
- HostingITrust.com
- HostingITrust.net
- Ray Creations
- Ray Creations India
- Ray Hosting
- Resorts in India
- Suparna
- The Village Andharmanik
- Travel India
- Unique Designs
- Web Hosting Review
- Website Design Company

