Images

Understanding the Box Model

Images

         To view the accompanying video for this lesson, please visit mhprofessional.com/nixoncss/.

When designing the CSS system, its developers needed to come up with a method of taking into account not just the elements being styled, but also their relationship to other elements, mainly with regard to spacing.

It was decided that there were three main areas to cover, which were padding, borders, and margins, with everything else applying to the contents of an element. Because HTML documents appear like boxes within ...

Get CSS & CSS3: 20 Lessons to Successful Web Development 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.