Answers Search Help
Boston University home page
Dreamweaver: Styles and Behaviors
 
 
    CSS Styles
 
 
 
 
 
 
 
 
 
    Behaviors
 
 
 
 
 
    Also See
   
   
   
   

CSS Styles Overview

Cascading Style Sheets can be used several ways. A style can be applied:

  1. In-line (similar to applying a <font> tag).
  2. On a document-wide basis (the styles are available for formatting only on one page).
  3. 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:

  1. 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.

  2. Create a custom style (the most flexible; apply anywhere). For example:
    This sentence uses several different types of custom styles including underlines, overlines, borders around items, wider letterspacing, highlight effects, extra line spacing, and combinations of custom styles. (Note that if you are viewing this page in Netscape 4, you will not see most of the custom styles—only IE4/5 and newer, Netscape 6 and newer, Mozilla and other modern browsers offer good support for custom CSS Styles.)
  3. 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.

 

WebCentral Using Publishing Learning Training Consulting WebCentral
Answers Search Help
NIS  |  OIT  |  Boston University  |   January 9, 2007