Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

margin-right

Definition

The margin-right property specifies the width between the element's right border and the element's outer edge, represented by the yellow highlighted area in the illustration below.

Illustration of the CSS box model. The area between the right border and the  outer edge is highlighted in yellow.

Example

  1. h1 {margin-right: 10px}

Characteristics

Possible values

  • A specific length, a percentage of the parent element's width or the keyword auto.
  • inherit
    Use the same computed value as the parent element for this property.

Default value

0

Applies to

Most elements

Inherited

No

See also