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

Get Cascading Style Sheets (CSS) by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.