@import@import*
*Contents  *Index  *Topic Contents
*Previous Topic: hover
*Next Topic: !important

@import

Description

Specifies a style sheet to import.

Syntax

@import url (URL);

Remarks

This differs from using the LINK element in that the @import statement is used as part of a style sheet definition inside a LINK or a STYLE tag. In the scripting model, this means that the owningElement property of the styleSheet object that represents a style sheet defined through @import will be either a STYLE or a LINK element. The statement should occur at the start of a style sheet, before any declarations. While Internet Explorer 4.0 allows @import statements to be anywhere within the style sheet definition, the rules contained within the @import style sheet will be applied to the document before any other rules defined for the containing style sheet. This can affect expected cascading affects.

Rules in the style sheet override rules in the imported style sheet.

Example

<STYLE type="css/text">
@import url(http://anotherStyleSheet.css)
P {color:blue}
</STYLE>

See Also

link, style, styleSheet, imports


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.