Chapter 10. Understanding the CSS Box Model and Positioning

What You’ll Learn in This Chapter:

How to conceptualize the CSS box model

How to position your elements

How to control the way elements stack up

How to manage the flow of text

In the preceding chapter, I mentioned the CSS box model a few times. This chapter begins with a discussion of the box model and explains how the information you learned in the preceding chapter helps you understand this model. It’s important to spend some time focusing on and practicing working with the box model, because if you have a good handle on how the box model works, you won’t tear your hair out when you create a design and then realize that the elements don’t line up or that they seem a little ...

Get HTML, CSS and JavaScript All in One, Sams Teach Yourself: Covering HTML5, CSS3, and jQuery, 2nd 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.