The first in a two-part tutorial on Cascading Style Sheets, thisarticle explains how to create and use style rules across your Web site,and then demosntrates a few basic CSS properties. Also included:inheritance, classes, contextual selectors and some lightbulb jokes.
If you're a Web developer, you've probably heard people speaking of CSS, or Cascading Style Sheets, in glowing terms...you may even have spoken of it yourself. By allowing developers to separate graphical elements from program code, CSS makes it possible to simply and rapidly adjust the look of a Web site, or make changes to the overall colour scheme and formatting of a Web page.
With a little thinking, it's possible to design a site in such a manner that the entire colour scheme of the site can be quickly changed from olive green to slate grey and back again with just a few simple alterations to a single file.
Sounds fantastic? It is...and over the next few pages, this primer will attempt to teach you the basics of CSS - a few simple concepts, a look at style rules and definitions, and an explanation of the important properties you need to know to fully utilize the power of this technology.