Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

590 B

title
title
Add Different Margins to Each Side of an Element

Add Different Margins to Each Side of an Element


Problem Explanation

To adjust the margins of an element use:

.example {
  margin: 10px;
}

To specify margins sizes on an element by individual sides we can use 'margin-top', 'margin-right', 'margin-bottom', and 'margin left'. We can use any of these in combination and in any order. For example:

.example {
  margin-top: 5px;
  margin-bottom: 0px;
}

Or:

.example {
  margin-top: 20px;
  margin-left: 25px;
  margin-right: 5px;
}