Creating internal and external style sheets


    To create a style sheet, first determine whether the style sheet should be internal or external. An internal style sheet is written into the head section of a Web page and is typically used if the styles aren't used on more than one page. An external style sheet exists as a separate file, which is useful if you want multiple pages to share the same styles. In addition, GoLive lets you import the styles from an external style sheet into an internal style sheet or export an internal style sheet to an external style sheet file. You can use both an internal style sheet and external style sheets in a single Web page.

    Note: Except for their title bars, internal and external CSS Editors appear identical. An internal CSS Editor displays the Web page's file name in the title bar. An external CSS Editor displays the external style sheet's file name in the title bar.

    TipCreate different external style sheets and apply each external style sheet separately to a page to quickly preview different sets of styles.

To create an internal style sheet:

  1. Click the Open CSS Editor button Open CSS Editor button in the upper right corner of the Layout Editor.
  2. Add styles to the style sheet with one or more of the following methods:

To create an external style sheet:

  1. Do one of the following:
    • To create a new external style sheet, choose File > New Special > Cascading Style Sheet. The external CSS Editor displays.
    • To create an external style sheet based upon the styles of a page's internal style sheet, open the Web page, and click the Open CSS Editor button Open CSS Editor button . Choose File > Export > Internal Style Sheet. Name the file using .css as the extension, and save the file to your site folder.
  2. Add styles to the style sheet. (See Creating CSS styles in a style sheet.)
  3. Note: To reference an external style sheet in an external style sheet, use the @import button, see Referencing external style sheets from an external style sheet.

  4. Reference the external style sheet from one or more pages. (See Using external style sheets.)
  5. To see all the pages that use an external style sheet, open the In & Out Links palette and then select an external style sheet in a site window. Tip

To add comments to a style sheet:

  1. In the CSS Definitions tab in the CSS Editor, click in a blank white area to display the Create buttons on the right side of the Editor.
  2. Click Create Comment in the Advanced section.
  3. With the comment selected under the Name column, enter comments in the text field on the right side of the CSS Editor.