CSS The Box Model

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • box-sizing: parameter;

Parameters

ParameterDetail
content-boxWidth and height of the element only includes content area.
padding-boxWidth and height of the element includes content and padding.
border-boxWidth and height of the element includes content, padding and border.
initialSets the box model to its default state.
inheritInherits the box model of the parent element.

Remarks

About padding-box

This value was only implemented by Firefox and thus should not be used. It was removed in Firefox version 50.0.



Got any CSS Question?