Creating internal and external style sheets
To create a style sheet, you must first determine whether the style sheet should be an internal or external. An internal style sheet resides in 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. For the greatest flexibility, 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 internal and external style sheets in a single Web page. Note: Except for their title bars, the internal and external CSS Editors appear identical. The internal CSS Editor displays the "host" Web page's name in the title bar. The External CSS Editor displays the external style sheet's file name with the.css file name extension in the title bar. Create 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: - Click the Open CSS Editor button
in the upper right corner of the Layout Editor. - Add styles to the style sheet with one or more of the following methods:
- To create new styles, click the New Element Style button
, the New Class Style button , or the New ID Style button . (See Creating HTML element styles, Creating class styles, and Creating ID styles.) - To reference an external style sheet file, click the New Link to External CSS button
in the CSS Editor. Select an external style sheet, and click Open. See Referencing external style sheets. - To import styles from an external style sheet, in the CSS Editor choose Import External CSS from the context or CSS Editor menu. Or choose File > Import > External Style Sheet. Select an external style sheet, and click Open.
To create an external style sheet: - Do one of the following:
- To create a new external style sheet, choose File > New Special > Cascading Style Sheet.
- To create an external style sheet based upon the styles of a page's internal style sheet, in the internal CSS Editor, choose Export Internal CSS from the context or Style Sheet menu. Or choose File > Export > Internal Style Sheet.
- Name the file using .css as the extension, and save the file to your site folder to ensure GoLive maintains all file references.
- Add styles to the style sheet with one or more of the following methods:
- To create new styles, click the New Element Style button
, the New Class Style button , or the New ID Style button . (See Creating HTML element styles, Creating class styles, and Creating ID styles.) - To import styles from an external style sheet, in the CSS Editor, choose Import External CSS from the context or CSS Editor menu. Or choose File > Import > External Style Sheet.
- Reference the external style sheet from one or more pages. See Referencing external style sheets.
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.
To set viewing options for the CSS Editor: Open an internal or external CSS Editor, and set the following options in the View palette: Show Columns Choose column names, Show All, or Hide All from the pop-up menu to show or hide columns in the CSS Definitions tab of the CSS Editor. View Select from the following properties: - Folder for Sections separates the CSS Definitions tab of the CSS Editor into an Internal folder which lists internal styles, and an External folder which lists referenced external style sheets.
- Folder for Styles sorts the list of styles into style type folders, including Classes, Elements, or IDs.
- Show Prefixes displays the period prefix before class style names and the pound (#) symbol prefix before ID style names under the Name column. These prefixes are used in the source code whether or not this option is selected. Displaying the prefixes can help you identify each style's style type.
|