O'Reilly logo

CSS & CSS3 by Robin Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required