Basics of the CSS Box Model

Envato on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerUI6 min

About this video

This short tutorial introduces the CSS box model and explains how content, margins, borders and padding affect the layout and dimensions of HTML elements. It is aimed at people who are new to CSS layout.

What you’ll learn

  • Identify the content, padding, border and margin areas of an HTML element
  • Adjust element spacing with CSS margin and padding
  • Predict how the box model changes an element's overall dimensions