O'Reilly logo

Eric Meyer on CSS: Mastering the Language of Web Design by Eric A. Meyer

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

Styling the Document

This will actually be the first of several passes at styling this document. The first run will use a simple floating method, whereas the second will use a slightly more complicated positioning approach. Then we’ll add a third column to the mix and look at different ways to style that type of document.

Defining the Basic Look

The first step is to lay down the basic font rules and the general look of the headings. While we’re at it, let’s also give the paragraphs an increased line-height so that the lines are spread apart a bit. Looking at Figure 9.2, the results of these rules might seem a little bizarre, but hang in there. This will all make sense in a moment.

<style type="text/css">
html {margin: 0; padding: 0;}
body {font: ...

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