Answers for "text margin css"

CSS
1

margin for text in html

p {
  /*If you want to apply margin for all four sides with the same amount*/
  margin: 100px;
  /*Margin from top*/
  margin-top: 100px;
  /*Margin from bottom*/
  margin-bottom: 100px;
  /*Margin from right*/
  margin-right: 150px;
  /*Margin from left*/
  margin-left: 80px;
}
Posted by: Guest on February-26-2021
34

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;
Posted by: Guest on February-01-2020

Browse Popular Code Answers by Language