CSS margin on given side
CSS allows you to specify a given side to apply margin to. The four properties provided for this purpose are:
The following code would apply a margin of 30 pixels to the left side of the selected div.
The standard margin property can be expanded to specify differing widths to each side of the selected elements. The syntax for doing this is as follows:
The following example applies a zero-width margin to the top of the div, a 10px margin to the right side, a 50px margin to the left side, and a 100px margin to the left side.