Summary

Although some aspects of the CSS formatting model may seem counterintuitive at first, they begin to make sense the more one works with them. In many cases, what seem like nonsensical or even idiotic rules turn out to exist in order to prevent bizarre or otherwise undesirable document displays.

As it happens, having a firm grasp of the visual formatting model is a good foundation for understanding how positioning works. Thus, the next chapter will cover positioning, and do so in a manner very similar to this chapter: the discussion is largely theoretical.

Get Cascading Style Sheets: The Definitive Guide 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.