VOOZH about

URL: https://www.geeksforgeeks.org/css/css-margin-bottom-property/

⇱ CSS margin-bottom Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS margin-bottom Property

Last Updated : 28 May, 2026

The margin-bottom property in CSS is used to add space below an element. It helps maintain proper spacing between elements in a webpage layout.

  • It specifies the bottom margin area of an element.
  • The margin can be set using length values or percentages.
  • The default value of the margin-bottom property is 0.

Syntax:

margin-bottom: <length> | <percentage> | auto

Property values:

  • Length: This value specifies the length of the margin with a fixed value. This value can be positive, negative or zero. 

Example:

  • Percentage: This value specifies the amount of margin as a percentage relative to the width of the containing element. 

Example:

  • auto: If the value of this property is set as "auto" then the browser automatically calculates a suitable value for the margin size.
Comment
Article Tags: