Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Before we talk about anything new there are a few fundamentals we need to take care of, such as how to place CSS on your site and how to select specific styles for specific devices (iPhone or iPad).
Question: Do you embed your CSS in your page or externalize it (put it in a separate .css file)?
Answer: Sometimes for testing I put the CSS in my page where I can have visibility to all the rules and properties, but this generally isn't a good idea because it makes CSS rules less reusable and more difficult to maintain. Inline CSS looks like this:
<head>
<style>
header,nav,footer,article,section {margin:5px;}
header,nav,footer {border:1px solid #000;}
section {border:1px dotted green;}
</style>
</head>
When you want to externalize your CSS there are two ways: one is to link your document via the <link> tag, and the second is to import your document via the @import rule.