Stylesheet Overview

Stylesheets are also known as CSS (Cascading Style Sheets). Simply put, they contain information about the rest of the Web page. You use stylesheets to define how your text looks, what color it is, where layers go, and what certain HTML tags do. Stylesheets also allow you to add borders and background colors to layers or individual bits of text. Unfortunately, these more-fancy features of stylesheets are implemented differently by the various browsers, so it's best to keep things fairly simple.

Example 8-1 shows a sample stylesheet.

Example 8-1. Sample stylesheet
 <style type="text/css"> #header { position: absolute; left: 36; top: 31; } #nav { position: absolute; left: 0; top: 122; } #gal { position: absolute; left: 515; ...

Get Advanced JavaScript™: Insights and Innovative Techniques 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.