CSS MARGINS

MARGIN property is used to create space around the element. We can set the different size of margins for individual sides(top, right, bottom, left) either in px,5 or browser defined (auto).

1.margin with 4 values


    margin: top right bottom left;

margin: 10px 20px 10px 20px;

2.margin with 3 values


    margin: top (right-left) bottom;
margin: 10px 20px 10px;

3.margin with 2 values


    margin: (top-bottom) (left-right) ;
margin: 10px 20px;

4.margin with 1 value


    margin: (top- right-bottom-left);
margin: 10px;

CSS PADDING

 padding property is used to create space around the element, inside any defined border .We can set the different size of padding for individual sides(top, right, bottom, left) either in px,5 or browser defined (auto).

1.padding with 4 values


    padding: top right bottom left;
padding: 10px 20px 10px 20px;

 

2.padding with 3 values


    padding: top (right-left) bottom;
padding: 10px 20px 10px;

3.padding with 2 values


    padding: (top-bottom) (left-right) ;
padding: 10px 20px;

4.padding with 1 value


    padding: (top- right-bottom-left);
padding: 10px;

DOWNLOAD LATEST PROJECTS