asp.net.ph

Skip Navigation Links

@import Rule

CSS Attributes Index   Pseudo-class Attributes


Specifies a stylesheet to import.

Syntax


HTML @import url( sUrl )
Script N/A

Possible Values


sUrl String specifying the URL referencing a cascading style sheet.

Remarks

Using the @import rule differs from using the LINK object in that the @import statement is used as part of a stylesheet 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 stylesheet defined through @import will be either a STYLE or a LINK object.

The @import rule should occur at the start of a stylesheet, before any declarations. While Microsoft® Internet Explorer® 4.0 allows @import statements to be anywhere within the stylesheet definition, the rules contained within the @import stylesheet will be applied to the document before any other rules defined for the containing stylesheet, affecting expected rendering.

Rules in the stylesheet override rules in the imported stylesheet.

Example

The following example imports a stylesheet located at "http://anotherStyleSheet.css".

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

imports, LINK, style, styleSheet



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note