home *** CD-ROM | disk | FTP | other *** search
- <HTML>
- <HEAD>
- <TITLE>Manipulating Style Sheets in IE4</TITLE>
-
- <LINK ID=linked REL=STYLESHEET TYPE="text/css" HREF="linkedStyle.css">
-
- <STYLE ID=defined TITLE="The Defined Style Sheet">
- H1 { color: darkBlue; margin: 0px; font-size: 18pt; }
- .layer { position: absolute; }
- #banner { background-color: yellow; }
- </STYLE>
- </HEAD>
-
- <BODY>
- <BLOCKQUOTE>
-
- <P><IMG ID=arrow SRC="arrow.gif">
-
- <DIV ID=banner CLASS=layer STYLE="color: blue; left: 72; top: 15;">
- <H1>
- Manipulating Style Sheets in IE4
- </H1>
- </DIV>
-
- <BR><BR>
- Style sheets in IE 4 can be manipulated by adding new rules
- to specific style sheets, importing new style sheets and disabling
- existing style sheets. Click on the links below to manipulate the
- style sheets attached to this document.</P>
-
- <P ALIGN=center>
- <A HREF="" onClick="attachImport(); return false;">
- Import the style sheet <TT>importStyle.css</TT>
- </A></P>
-
- <P ALIGN=center>
- <A HREF="" onClick="disableLinked(); return false;">
- Disabled the style sheet <TT>linked</TT>
- </A></P>
-
- <P ALIGN=center>
- <A HREF="" onClick="addRule(); return false;">
- Add the rule<BR>
- <TT>BODY { font-weight: 900 }</TT><BR>
- to the defined style sheet
- </A></P>
-
- <SCRIPT>
- function attachImport()
- {
- document.styleSheets.defined.addImport("importedStyle.css");
- }
-
- function disableLinked()
- {
- document.styleSheets.linked.disabled = true;
- }
-
- function addRule()
- {
- document.styleSheets.defined.addRule("BODY", "font-weight: 900");
- }
- </SCRIPT>
-
- </BLOCKQUOTE>
- </BODY>
- </HTML>
-