BackFirst PageNext

Formatting Pages with Style Sheets

A style is a formatting specification for page display. HTML styles are independent entities that have no effect on the structure of a document; they are used by authors to assert control over the way their documents look. HomeSite styles can be quite detailed, or as simple as changing a margin. You can type a STYLE block directly into an HTML document or use the Style Editor.

To learn more about Cascading Style sheets (CSS), see the World Wide Web Consortium's style sheet guide.

Also, see the Allaire Alive presentation on Cascading Style Sheets.

An extended help file on CSS is available at the Web Worker's Toolbox site.

Tip

You may want to adopt a naming convention for styles so that you can quickly identify them. For example, if you plan to create multiple Heading 1 styles, you could use the class name followed by the attribute, such as, H1.red italic, H1.blue indent. Style names can contain any combination of characters and spaces.

To create a style with the Style Editor:

  1. Click File > New (CTRL+N) and select the StyleEd icon on the HTML tab.
  2. To define a style for a page element, first highlight it in the Selectors list. You can edit the list by clicking on the Selectors tool buttons.
  3. Click on an item in the Properties list and select a style from the dropdown list.
  4. Click the Show Preview tool button to view changes as you make them.
  5. Click the Show source for selected style tool button to view the HTML code for the changes you make.
  6. Continue the process for all the page elements that you want included in the style sheet.

To save a style:

You have a number of options for saving a style sheet:

Tip

To insert a style sheet, just drag and drop a .css file into the current document. The style sheet is automatically placed in the HEAD section of the document.

To edit a style:

You can use the Style Editor to change styles within a document or in CSS files.



BackFirst PageNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.