All TalkersCode Topics

Follow TalkersCode On Social Media - A Social Media Network for developers Join Now ➔

CSS Margin

CSS Margin is used to make space between the elements.Margin is completely transparent. You can use the value of margin independently by by giving the value of margin properties of top,left,bottom and right margin or you can also give the combined value.

Possible values of margin properties are auto,length,%,inherit.

Margin Properties

  • margin:You can give all the four values like
  • margin:20px 10px 15px 20px;

    margin:top right bottom left

  • margin-top:
  • margin-top:20px;

  • margin-right:
  • margin-right:10px;

  • margin-bottom:
  • margin-bottom:15px;

  • margin-left:
  • margin-left:20px;
    ❮ PrevNext ❯