Style Sheets
  Home arrow Style Sheets arrow Building Rounded Corners with CSS3`s -webk...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

Building Rounded Corners with CSS3`s -webkit-border-radius Property
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2010-03-19

    Table of Contents:
  • Building Rounded Corners with CSS3`s -webkit-border-radius Property
  • Review: the custom -moz-border-radius property
  • Introducing the -webkit-border-radius property
  • Including the previous CSS styles in a web page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building Rounded Corners with CSS3`s -webkit-border-radius Property


    (Page 1 of 4 )

    In this penultimate part of the series I demonstrate how to build an engaging rounded corner effect on WebKit-based browsers via the custom “-webkit-border-radius” property. The entire styling process is very simple, so you shouldn’t have major problems implementing it within your own web pages.

    Even though many major browsers most likely won’t support it any time soon, CSS3 will introduce -- sooner or later -- a significant evolution (not a revolution) in the way that websites are developed. Packaged with a great variety of enhanced and brand new features, the specification will allow developers to implement all sorts of clever things on web pages, ranging from using the so-called behavioral CSS, to working with div-based tables, to name just a few.

    Among the exciting features that CSS3 offers for free, there are a couple that deserve a closer look. They're useful for building rounded corners without having to deal with annoying and non-semantic markup or even appealing to the functionality of JavaScript. In this particular case, I’m talking about the “background” and “border-radius” properties, which let you add this decorative effect to any element of an (X)HTML document in a snap.

    To illustrate how useful these CSS3 properties can be, in previous tutorials of this series I developed some basic examples that showed how to create a rounded HTML container, first by assigning four different background images to it (a process also known as multiple background image layering), and second via the handy “border-radius” property.

    Unfortunately, the property works remarkably well in theory, but in reality it still suffers from lack of native support by some of the most popular browsers, so for the moment its functionality should be analyzed only from a theoretical point of view. A direct consequence of this is that different browser vendors have implemented custom versions of the property, which do allow you to render rounded corners very easily, but not in a truly standard way.

    In fact, I've already demonstrated how to build rounded corners on Mozilla-based browsers via the proprietary “-moz-border-radius” property, but it’s also feasible to produce similar results on WebKit-driven browsers by means of another custom implementation, not surprisingly called “-webkit-border-radius.” Therefore, in this penultimate installment of the series I’ll be discussing in detail how to work with the aforementioned property, which will be a straightforward process.

    Now, let’s explore this approach to building rounded corners with CSS3. Let’s jump in!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This penultimate part of the series demonstrates how to build an attractive rounded...
     

    STYLE SHEETS ARTICLES

    - Styling HTML Lists with CSS: Manipulating Pa...
    - Styling HTML Lists with CSS: Specifying Pad...
    - Styling HTML Lists with CSS: Resetting Paddi...
    - Absolute Positioning in CSS: a Dynamic Menu
    - CSS Absolute Positioning: Creating a Quick S...
    - CSS: Building Tooltips with Absolute Positio...
    - Styling Pseudo Classes with the RGBA CSS3 Pr...
    - Controlling Overall Transparency of an HTML ...
    - Altering the Border Opacity of an HTML Eleme...
    - The RGBA CSS3 Property: an Overview
    - Using Span Tags to Include Logos in Web Pages
    - Using a Single H1 Element to Include Logos i...
    - Combining Divs and H1 Elements to Include Lo...
    - Semantically Including Logos in Web Pages
    - Adding Text Indentation to Style Code Blocks...





     


     


    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek