Web pages with style
Style sheets are a way of defining formats for HTML pages. Style sheets let you define attributes for HTML elements like bodies, paragraphs, lists, etc. These definitions can be done once, and then they apply to the whole file. You can also define how links behave. Using CSS stylesheets some really nice effects can be achieved.
Stylesheets can appear within the web page itself, embedded within a tag, or stylesheets can be put into their own file. This latter case makes it easy to use one stylesheet often. Putting the stylesheet into a file means that you can change the file and then all of the styles for all web pages that include this file will automatically change. This is very useful. Stylesheets allow you to define some nice attributes for links. For example, the background can change color, or you can underline a hovering link by underlining it with a dotted red line. There are all sorts of cool stylistic effects.
DOMish. "Be DOMish on the web". Stylesheets are becoming conformant with hierarchical so called document object models for web pages. This basically means that you can define stylesheets hierarchically, or if you prefer to think of it this way, as nesting inside nesting. For example the paragraph style can be defined within a body, and it can be subdefined (like subclassing) within a "sidebar" style. Thus a paragraph inside a body has one style whereas a paragraph inside something else (inside the sidebar) can have overridden characteristics. Or alternatively, the links in a sidebar link bar area can have different characteristics from the regular links on the page. We refer you to the Meyers site (see the links below) to find examples of this.
Do you like left or right panels that have the nice dotted or dashed lines? These nice effects are easily achieved with stylesheets.
The downside is that browsers are slow in catching up with the standards. IE6 and the new Netscape (6 and greater) do these things nicely. But of course if you're selling stuff then you want the lowest common denominator browser, and so you have to wait to do this really cool stuff.
We have practiced these things ourselves.
A good way to begin with stylesheets is to "hock" a nice stylesheet and then modify it.
Here are a few links for more detailed reading.
Cascading Style Sheets The Definitive Guide - There is lots of documentation on style sheets, available from GNU sources.
Cascading Style Sheets, Level 2. It's not quite as easy as it might appear. Here is a whole O'Reilly book on the subject.
meyerweb.com - If you click around here in this Meyers site, you will find some incredibly cool things. Check out the cutting edge CSS stuff if you want to see some really cool web art. This requires a very modern browser though. Meyers demonstrates all sorts of cool effects - things that you probably always wanted to know.
Copyright @2002 FEREGO.
All
rights reserved.