Home arrow Style Sheets arrow Using CSS3`s Border-Radius Property to Build Rounded Corners
STYLE SHEETS

Using CSS3`s Border-Radius Property to Build Rounded Corners


In this second part of a five-part series, I show you how to build rounded corners on a web page by using the “border-radius” CSS3 property. This method creates this effect with no background images, and can also be customized. The method’s major drawback is that most current browsers don't support the property, which is quite frustrating from a practical point of view.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
March 17, 2010
TABLE OF CONTENTS:
  1. · Using CSS3`s Border-Radius Property to Build Rounded Corners
  2. · Review: rounded corners with multiple background image layering
  3. · Introducing the border-radius property
  4. · Putting the final touches on the rounded corners

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using CSS3`s Border-Radius Property to Build Rounded Corners
(Page 1 of 4 )

If you’ve had the chance to take a peek at the CSS3 draft, you’ll have realized that the specification comes with a set of exciting new features that can make the lives of web designers much easier. Many of these make up a real breakthrough in the field of web design -- but the hard reality tells us, unfortunately, that their implementation by most browser vendors will be a very slow process.

However, this shouldn’t prevent you from learning what CSS3 can do for you in the (near?) future. Some of its features are already supported by a limited number of browsers, like FireFox and Safari, though in most cases through proprietary properties. What’s more, among its new capabilities, CSS3 can create rounded corners in simple and straightforward fashion. This is something that, with current techniques, can be done only by using multiple block-level HTML elements or JavaScript.

To start demonstrating how easy it is to build rounded corners with CSS3, in the article that preceded this one I went through the implementation of this classic effect by assigning four different background images (one per corner) to a single div. This process, described in the CSS3 specification as “multiple background graphic layering,” allowed us to create the pertinent corners without having to utilize different containers or even appealing to the functionality of JavaScript.

It’s fair to stress, however, that CSS3 makes it possible to build rounded corners in a more direct way than using the background image layering approach. Instead, we can use its handy “border-radius” property. If this topic has caught your attention, in this second part of the series I’ll be taking a close look at this method.

Now it’s time to start using the “border-radius” CSS3 property for taming those wild rounded corners. Let’s go!


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials