|
|
 |
CSS Styles Overview
Cascading Style Sheets can be used several ways. A style can be
applied:
- In-line (similar to applying a
<font> tag).
- On a document-wide basis (the styles are available for formatting
only on one page).
- Site-wide (the styles are available to all pages on your site
that are attached to a common style sheet file).
There is not much benefit in using in-line styles (in fact, Dreamweaver
doesn't automated use of in-line styles). Document-level CSS is
nearly as easy to use as HTML Styles, but you would need to copy
your styles specifications to each new document to reuse the same
styles on other pages of your site.
Site-wide styles offer you the most power and flexibility. Once
you learn how to create and link to a common style sheet, you can
easily manage all your styles from one place. In CSS, you can:
- Redefine an HTML style (apply formatting to all
<p>
tags, or all <h1> heading tags, etc.) For instance,
you could set all your <h1> headings to a specific
font and color, and set all your <h2> headings
to a different font and color, etc.
- Use a CSS selector (actions on anchor tags)
CSS selectors use the active, hover, link, and visited properties
of anchor tags. Setting these will change how your links behave.
Note: CSS selectors are not fully supported in Netscape 4.x.
|