margin-right

It is possible to define individual margins by adding a direction suffix to the margin general attribute. Margin-right will set the right margin for this element.

Value Description
size px - size in terms of pixels
em - size in terms of the current font size
in - size in terms of inches
cm - size in terms of centimeters
percentage The width of this element will be a percentage of the element it is inside of.
auto The browser will automatically choose the value.

Code:

p { margin-right: 65px; border: 1px solid black; }

Display:

This paragraph had one margin speficied (right), using a directional declaration.

Compatibility Issues:

IE 5.0 - Does not support the value "auto".
IE 5.5 - Margins are less buggy than in 5.0