CHAPTER 3CSS Building Blocks

In this chapter, the focus is chiefly on common CSS building blocks. For the most part, their uses should be fairly obvious, as the terms correlate well with the real world. Margin, padding, borders, widths, heights—all familiar terms for things that do what you are probably assuming they do.

One key aspect of CSS design is the use of divisions to provide greater flexibility and mark out regions of the page. As a number of building block methods rely on divisions for targeting their impact, it seems appropriate to delve into them right away.

Divisions (Divs)

Divisions<div> elements, widely referred to as divs—are (X)HTML elements used to define areas of an (X)HTML file. A division can, if you choose, encompass everything ...

Get Beginning CSS Web Development: From Novice to Professional 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.