Home
CSS Box StylesmarginThe margin widths for all four sides of an element can be set with this shortcut attribute. The margin is space between an elements border and adjacent elements. You may specify one to four width values. If you supply just one value, all four margins will be set to this value. If you supply two values, the first will set the top and bottom margins, the second will set the left and right. If you supply three values, the first will set the top, the second the left and right sides, and the last will set the bottom margin. If you supply four, they will set top, right, bottom, and left in that order. css syntaxmargin: width [width] [width] [width]paddingThe padding widths for all four sides of an element can be set with this shortcut attribute. The padding is the space inside the elements border between the content and the border. You may specify one to four width values. If you supply just one value, the padding for all four sides will be set to this value. If you supply two values, the first will set the top and bottom padding, the second will set the left and right. If you supply three values, the first will set the top, the second the left and right sides, and the last will set the bottom padding. If you supply four, they will set top, right, bottom, and left in that order. css syntaxpadding: width [width] [width] [width] |
|