10.3 Round Corners
Although it's been some time since web designers were coaxed away from using tables for layouts, web pages can still sometimes look a little "blocky". Perhaps this is to be expected; after all, web pages are simply an online reference media that is no different really to offline media such as newspapers and books. In addition, HTML elements are surrounded by boxes and we use the div selector to divide pages into box-like sections. All that said, it is still nice to round some of the sharp corners off once in a while.
There will eventually be cross-browser support for the border-radius property in CSS, where specific rounded corners can be added to borders like this:
div {border-radius:15px;}
However, until this happens, most web designers have to rely on using either javascript to accomplish the job, which is another web language, or more commonly, CSS tricks and background images. There are many techniques available for this but most are variations on the three that will be discussed over the next few pages:
These three techniques can produce some interesting layouts and will be covered next.