Style Rules
Embedding a Style Sheets
External Style Sheets
Importing a Style Sheets
Styles Inline
Class
ID
SPAN and DIV
Quick Reference Table
HTML Tutorial
Databases and ASP
   


Importing a style sheets

A style sheet may be imported with CSS's @import statement. This statement may be used in a CSS file or inside the STYLE element: You can combine importing with other methods since other CSS rules can be included in the STYLE element, but that all @import statements must occur at the start of the style sheet.

<HTML>
<HEAD>
<TITLE>Importing style sheets</TITLE>
<STYLE TYPE="text/css">
<!--
@import url (top.css);
H4 {color: red; font-family: verdana; font-size: 12px }
-->
</STYLE>

</HEAD>
<BODY>
<H4>Browsers Compatibility</H4>
<p>Only IE 4 and 5 support importing style sheets!</p>
</BODY>
</HTML>

Click here to see the result:

Note:
Any rules specified in the style sheets itself override conflicting rules in the imported style sheets. For example, even if the imported style sheets contained H4 { color: blue; font-family: verdana; font-size: 12px }, the embedded rules win out and the text displays as red. So remember you can use as many style sheet files as you wish and override them with embedded styles.

Remember only IE 4 and 5 support importing stylesheet.