what is margin code example

Example 1: css margin top

.yourClass {
  margin-top: 25px;
}

Example 2: margin css

/* Apply to all four sides */
margin: 1em;
margin: -3px;

/* vertical | horizontal */
margin: 5% auto;

/* top | horizontal | bottom */
margin: 1em auto 2em; 

/* top | right | bottom | left */
margin: 2px 1em 0 auto;

/* Global values */
margin: inherit;
margin: initial;
margin: unset;

Example 3: css margin

#blockOrInline-Block {margin: 0px/*top*/ 0px/*right*/ 0px/*bottom*/ 0px/*left*/;}

Example 4: margin

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

Example 5: margin

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  	font-size: 2rem;
}

Tags:

Css Example