![]() |
| Some cause happiness wherever they go; others whenever they go. |
|
Article Navigation: -Introduction -Adding CSS to your pages -Controlling Fonts -Controlling Layout -Color and Background -Position and Visibility -Conclusion |
Wilde Tutorial: Cascading Stylesheets Chad Mazzola HTML was never intended to be used as a precise design tool. Much of the more useful features, such as tables, were added afterwards when the need for greater control over layout became apparent. But HTML remains an essentially inefficient tool for producing even a mildly complex page. Anyone who has experience designing in standard HTML has felt that hot rush of anger as you typed <font face="arial"> for the 534th time on the same page. Wouldn’t it make much more sense to define the font face once, and then have it apply for the entire page? Wouldn’t it be nice to have control over spacing between lines of text and even between words? How about the ability to write text rollovers in two lines of code, for the entire page? Well stylesheets give you the ability to do all of this, and much much more. Cascading stylesheets (also known as CSS, or just plain old stylesheets) are, in my opinion, a monumental leap forward in terms of efficiency and controllability, as well as being superior in terms of code size and reusability. However, they have failed to gain universal acceptance for the same reason that most new web technologies fail: failure to be completely supported by browsers. Version 3.0+ browsers support most of the core features, and Internet Explorer 5.0 has made strides toward actually listening to the WC3 recommendations, so compatibility may not be as big an issue as it would first seem. However, if you plan to do extensive design using CSS, think about who will be visiting your site, and decide if using a newer technology will leave too many of your vistors with a page that is a mess. When working with web technologies the best strategy is to account for the lowest common denominator, but keep an eye toward greener pastures of universal implementation. So with this, why not start our journey by learning the basic rules for including stylesheets in your HTML pages. |