O'Reilly logo

Cascading Style Sheets (CSS) by Example by Steve Callihan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 { ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required