|
Cascading Style Sheets Quick Reference
This section is a Cascading Style Sheets (CSS) quick reference. It provides quick basic descriptions
of how to do things with CSS. It is not a comprehensive tutorial, nor is it a definitive reference.
For simplicity, most of the examples show how to set style using the inline method. You should
be able to easily convert these to embedded or externally linked declarations.
CSS provides the page design capability for the Web that print publishing has been enjoying for years.
Style sheets give you accurate control over page layout and positioning, advanced font control, and color
control. With style sheets, you can specify text sizes and spacing between lines (leading) in points.
CSS separates the typographics and page layout from the content of Web pages, making it much easier to
revise your content or change your page design. With CSS, you can change the formatting of individual Web
pages or your entire site without editing every single HTML tag in every single file.
The CSS standard has changed as it evolved, for example the original standards stated that a relative
positioned element always creates a new containing block. Later, the standard changed to state that a
relative positioned element follows the rules of non-positioned elements.
There are inconsistencies in how different browsers handle given features, even inconsistencies
between different browser versions from the same company. Even the latest versions of the most popular browsers
have CSS bugs. Like Microsoft Internet Explorer 6.0s "peek-a-boo" bug, where an element's content disappears
and reappears as you scroll the page.
CSS has a lot to offer, but it's best to keep it simple. If you try to get too sophisticated in your use
of CSS you'll learn why the most common phrase found in most articles on CSS is "work around". If you write
lots of extra code to work around the inconsistencies and bugs, your webpage might display correctly until
the next standard change or browser version release. Keep it simple!
|