White space around the element

whitespace

Specify how much white space surrounds the element's content and outer border.

  • margin
  • margin-top
  • margin-right
  • margin-bottom
  • margin-left
  • padding
  • padding-top
  • padding-right
  • padding-bottom
  • padding-left
  • box-sizing

margin

Margin all-in-one spec

Use this property to specify margin-top, margin-right, margin-bottom, and margin-left.
css, style, whitespace, margin

margin-top

Bottom of previous element to border-top

The white space between the previous element's bottom and this element's top border, which is not filled with the background color.
css, style, whitespace, margin-top

margin-right

Border-right to left edge of adjacent element

The white space between this element's right border and the left edge of the adjacent element, which is not filled with the background color.
css, style, whitespace, margin-right

margin-bottom

Border-bottom to the top of the next element

The white space between this element's bottom border and the top of the next element, which is not filled with the background color.
css, style, whitespace, margin-bottom

margin-left

Right side of adjacent element to border-left

The white space between the adjacent element's right side and this element's left border, which is not filled with the background color.
css, style, whitespace, margin-left

padding

Padding all-in-one spec

Use this property to specify padding-top, padding-right, padding-bottom, and padding-left.
css, style, whitespace, padding

padding-top

From border-top to content

The unused space between the top border and the element's content, which is filled with the background color.
css, style, whitespace, padding-top

padding-right

From content to border-right

The unused space between the right border and the element's content, which is filled with the background color.
css, style, whitespace, padding-right

padding-bottom

From content to border-bottom

The unused space between the bottom border and the element's content, which is filled with the background color.
css, style, whitespace, padding-bottom

padding-left

From border-left to content

The unused space between the left border and the element's content, which is filled with the background color.
css, style, whitespace, padding-left

box-sizing

Width and height calculations

This property defines whether or not the element's border and padding should be considered as part of the element's width and height.
css, style, whitespace, box-sizing
0

style > whitespace White space around the element

🔗 🔎