make the padding equal to the margin code example

Example 1: css reset margin padding

* {
  margin: 0;
  padding: 0;
}

Example 2: css padding vs margin

/* Answer to: "css padding vs margin" */

/*
  Margin is outer space of an element, while padding is inner space
  of an element. Margin is the space outside the border of an
  element, while padding is the space inside the border of it.
  Margin accepts the value of auto: margin: auto , but you can't
  set padding to auto.

  For more information, head over to:
  https://stackoverflow.com/questions/2189452/when-to-use-margin-vs-padding-in-css
*/

Example 3: css margin top responsive

span{
margin: -53px auto 0;
/* -53px is not the default value, 
I suggest changing this value to the one 
that best fits your website */
}

Tags:

Css Example