CSS2 - Margin Properties



This is a complete reference guide for web developers where we have listed all the CSS properties related to margin defined in the World Wide Web Consortium's Recommended Specification for Cascading Style Sheets, Level 2.

Click any property to see its description with examples −

Sr.No. Property & Description
1 margin

Defines all four of an element's margins.

2 margin-bottom

Defines the bottom margin of an element. Default value is 0.

3 margin-left

Defines the left margin of an element. Default value is 0.

4 margin-right

Defines the right margin of an element. Default value is 0.

5 margin-top

Defines the top margin of an element. Default value is 0.

css_references.htm
Advertisements