Skip to Content
Practical Web Design
book

Practical Web Design

by Philippe Hong
April 2018
Beginner content levelBeginner
368 pages
7h 37m
English
Packt Publishing
Content preview from Practical Web Design

The boxes

 The box model consists of four properties: 

  • Content: The text, images, and so on
  • Padding: A transparent area around the content, inside the box
  • Margin: The space between the boxes
  • Border: This goes around the padding and the content

Have a look at following diagram for a better understanding:

A CSS box model can be described as shown in the preceding diagram.

Box models can also let us set the height and the width of an element. By setting the width or the height of the content with the following: 

Width: 200px;

 The width of the content will be 200px.

Now, the annoying thing about the standard box-model is that you can only set ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Design Playground

Web Design Playground

Paul McFedries
Hello Web Design

Hello Web Design

Tracy Osborn
The Principles of Beautiful Web Design, 4th Edition

The Principles of Beautiful Web Design, 4th Edition

Jason Beaird, Alex Walker, James George

Publisher Resources

ISBN: 9781788395038Supplemental Content