From the course: CSS Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

The box model properties

The box model properties - CSS Tutorial

From the course: CSS Essential Training

The box model properties

- [Instructor] Every element is displayed as a box in the browser. The CSS box model describes how these elements are displayed, which consists of four parts. The content box contains the content added using the HTML tags. The padding box surrounds the content and adds space inside of the element. The border box surrounds the padding area and the margin box surrounds the entire element. These boxes are represented by five CSS properties: width, height, padding, margin, and border. Let's review the syntax and usage. The width and height properties are used to set the width and height of an element's content box. They can be used with keywords, length and percentage values. You can also set a minimum or maximum value with min-width, max-width, min-height, and max-height properties. The padding property defines the space inside of an element and around the content box. It can be defined with length or percentage values.…

Contents