Narendra Dhami

My Site

CSS 3 Rounded Corners

Posted by Narendra Dhami on August 20, 2008


Border-radius property for FireFox and Safari 3 (only). And here are some nice examples how to use it.

#box {
     background: #eee;
     border: 1px solid #ccc;
     padding: 15px;
     -moz-border-radius: 10px;
     -webkit-border-radius: 10px;
}

And of course you don’t have to make all corners rounded, it can be just top left etc, so the code goes like this (small not, for example you can’t make rounded corners on images and stuff like that)

* -moz-border-radius-topleft and -webkit-border-top-left-radius
* -moz-border-radius-topright and -webkit-border-top-right-radius
* -moz-border-radius-bottomleft and -webkit-border-bottom-left-radius
* -moz-border-radius-bottomright and -webkit-border-bottom-right-radius

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: