--- title: margin-right slug: Web/CSS/margin-right tags: - CSS - CSS Referenz translation_of: Web/CSS/margin-right ---
{{ CSSRef() }}
Die margin-right Eigenschaft legt den rechten Außenabstand eines Elements fest. Negative Werte sind erlaubt.
0table, table-caption und inline-tablemargin-right: <Längenangabe> | <Prozentzahl> | auto | inherit
auto wird von einem passendem Wert ersetzt, wobei die horizontalen bzw. vertikalen Dimensionen berücksichtigt werden..content { margin-right: 5%; }
.sidebox { margin-right: 10px; }
.logo { margin-right: -5px; }
| Browser | ab Version | auto Wert |
|---|---|---|
| Internet Explorer | 3.0 | 6.0 (strict mode) |
| Firefox (Gecko) | 1.0 (1.0) | 1.0 (1.0) |
| Opera | 3.5 | 3.5 |
| Safari (WebKit) | 1.0 (85) | 1.0 (85) |
{{ languages( { "en": "en/CSS/margin-right", "ja": "ja/CSS/margin-right" } ) }}