PART I

image

CSS Basics

If you come from a graphic design background, the idea of using code to control the look and feel of a website probably sounds bizarre. But it’s not as bad as it sounds. Styling a site with Cascading Style Sheets (CSS) involves creating a set of instructions that tell the browser what color, size, and font you want to use for your text; how much whitespace you want around different parts of the page; and so on.

The instructions consist of simple pairs of properties and values. Most properties have intuitive names such as font-size, margin-top, or border-color. Values are specified using keywords or concepts that you’re likely ...

Get Beginning CSS3 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.