• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

A Practical Example

In the following exercise, you create a practical example of using the @import at-rule to exclude Netscape Navigator 4 from accessing certain style rules and properties. To get started, first edit perform-motive4.html, as shown here (don't save it yet, however):

<style type="text/css">
body {  margin: 0;  color: white; background: #660000; }
h1 {  color: navy; background: #ffffcc url(paper.gif); text-align: center; margin:
0.15em 10%; padding: 0.1em 5%; border: dotted 12px olive; }
h2, h3 {  color: #66ffcc;  background: transparent; }
div.body {  font-family: Verdana, Arial, sans-serif; font-size: 1.1em; color:
#ffff99; background: navy url(dark.jpg); border: solid 0.5em #ff9933; margin:
0.5%; padding: 0.2em 1%; }
div.body p {  text-align: left; margin-left: 1%; margin-right: 1%; }
div.inset {  color: navy; background: url(clouds.jpg) aqua; border: inset 10px
aqua; font-family: Verdana, Arial, sans-serif; padding: 0.2em 4% 0 0; margin: 0
15% 1em; text-align: center; }
a {  color: lime; background: transparent; }
.invisible {  display: none; }
<script language="javascript" type="text/javascript" src="domsniff.js">
<body text="#ffff99" link="lime" vlink="lime" bgcolor="#660000" background="dark.jpg">

<iframe class="invisible">
						This site will look much better
						in a browser that supports
						<a href="http://www.webstandards.org/upgrade/"
						title="Download a browser that
						complies with Web standards.">
						web standards</a>,
						but it is accessible to any browser
						or Internet device.




Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint