Add Different Margins to Each Side of an Element


Sometimes you will want to customize an element so that it has a different margin on each of its sides.

CSS allows you to control the margin of an element on all four sides with margin-top, margin-right, margin-bottom, and margin-left properties.

Give the green box a margin of 40px on its top and left side, but only 20px on its bottom and right side.