The CSS Box Model

New to CSS? The first order of business is to understand how the box model works. Every element on a page should be seen as a box, with possible paddings, borders and margins. Hereโ€™s how it gets applied:

ContentPaddingBorderMarginTopBottomRightLeft

Note that if you apply a box-shadow to an element thatโ€™s not an inset box shadow, itโ€™ll show outside the border, no matter the margins.

  Tweet It

๐Ÿ•ต Search Results

๐Ÿ”Ž Searching...

Sponsored by #native_company# โ€” Learn More
#native_title# #native_desc#
#native_cta#