Chapter 3. Positioning Elements

In this chapter, you will learn about the box model, the position and display properties, and how to float and clear elements. Positioning techniques you will learn in this chapter are central to understanding CSS and will give you the core abilities you need to successfully create CSS page layouts.

The box model describes the rectangular boxes that are generated for every HTML element in your markup. These boxes are laid out on the page according to the visual formatting model. Visual formating is primarily controlled by three properties: the position property, which defines the positional relationship between the elements on the page; the display property, which determines whether elements stack, sit side-by-side, ...

Get Stylin’ with CSS: A Designer’s Guide, Third Edition 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.