Importing an existing style sheet

You can import a style sheet in the Global Style Sheet editor and in the standalone Style Sheet editor. The style sheet editors include a pointer to the imported style sheet using the @import rule.

The @import rule allows you to import style rules from other style sheets. Any @import rules must precede all rule sets in a style sheet. The @import keyword must be followed by the URI of the style sheet you want to include.

NoteImport rules and client browsers Not all browsers support @ rules. You should make sure the browsers that will be used to view your Web site support these rules before you link a style sheet through the @import rule.

StepsTo import an existing style sheet:

  1. Right-click the STYLE[#] item (or the style ID) in the left pane of a style sheet editor.

    This is the top item in the standalone Style Sheet editor. This is a second level item in the Global Style Sheet editor. If you assign an ID to a style sheet in the Global Style Sheet editor, the ID for the style sheet replaces the generic STYLE[#] listing in the left pane of the editor.

  2. Select Insert@import from the pop-up menu.

  3. In the Choose URL dialog box, specify the URL of the style sheet that you want to import, save, and click OK.

    A pointer is added to the chosen style sheet. You can view the source code for the pointer directly in the Source tab of the standalone Style Sheet editor while the topmost item in the left pane is selected:

    Shown is the Style Sheet Editor. In the left pane is the entry Style ( 0 ) and indented under it is @ import ( 0 ). At right is the Source tab page displaying the text @ import u r l ( My style dot css ) ;

    To view the source code generated by the Global Style Sheet editor, you must look at the current Web page in the Source view of the HTML editor.