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

As has been the case for many of our projects, we’ll start by placing elements where we want them and then style them a step at a time. By the time we’re done, we should have an artistic design that offers effects that have been heretofore impossible in HTML-based Web design.

Blocking Out the Design

The first step is to get the two main pieces of the page where we want them. The document we have to work with is split into two div elements: one with an id of content and a second with an id of links that follows the content div. Let’s position the links on the left side of the page and move the content div out of its way.

<head>
<title>complexspiral</title>
<style type="text/css">
div#content {margin: 40px 25px 25px 150px;} ...

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