CSS Margin (All Properties)

Please Share On:

Definition:

CSS Margin property is used to put a space outside defined borders. You can put margins individually into each side of the elements by using the following syntax.

Margin Properties:

Margin PropertiesDescription
marginApplies margin to all four sides.
margin-topApplies margin to element’s top.
margin-rightApplies margin to element’s right.
margin-bottomApplies margin to element’s bottom.
margin-leftApplies margin to element’s left.
margin:autoApplies margin to auto to horizontally center.
margin: inheritApplies margin inherited to its parent elements.
margin: collapsecollapse margin.

Donate to support writers


You may be interested in the following topics:

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright @2023. All Right Reserved.


Social media & sharing icons powered by UltimatelySocial