Applying style sheets to Web pages

By setting a link from your page to an existing style sheet (.css file), you can apply the styles in that file to your page.

Create a style sheet.

Tip: To apply a style sheet to all the pages derived from a page template, apply the style sheet to the page template.

To set an external style sheet link from a Web page:

  1. Open the page that you want to link to a cascading style sheet.

  2. In the Styles view, select the

    Link or import external style sheet tool bar button in the Styles view, or right-click the page and select

    Style | Link to Style Sheet from the context menu.

  3. Click the list button to locate the external style sheet that you want to link to. You have the option of either locating the desired .css file within your project workspace (the Browse menu option), or importing one of the samples provided with the workbench, using the

    Import from Samples menu option.

  4. Select the

    Link radio button and then click OK.

    You can also select the

    Import radio button. This type is, however, not supported by all browsers. Therefore, it is recommended that you select the

    Link radio button.

The name of the selected style sheet appears in the Styles view, and the settings in the style sheet are applied to the page being edited.

If you have embedded styles in the HTML file, the embedded styles override the style specifications in an external style sheet.

 

Related concepts

Cascading Style Sheet (CSS) Designer

 

Related tasks

Editing style sheets

Previewing styles for a Web page

Applying sample style sheets to Web pages from the Gallery