View video tutorial
CSS Margin Shorthand
CSS
The margin shorthand property is used to specify all margin properties on one line.
CSS margin Shorthand
The following properties are used in margin shorthand.
margin-top
margin-right
margin-bottom
margin-left
margin: 20px 40px 60px 80px;
Here,top:20px.
right:40px.
bottom:60px.
left:80px.
Click on the "Try it Now" button to see how it works.
margin: 20px 40px 60px;
Here,top:20px.
right:40px.
bottom:60px.
left:40px.
Click on the "Try it Now" button to see how it works.
margin: 20px 40px;
Here,top:20px.
right:40px.
bottom:20px.
left:40px.
Click on the "Try it Now" button to see how it works.
margin: 20px;
Here,top:20px.
right:20px.
bottom:20px.
left:20px.
Click on the "Try it Now" button to see how it works.