--- title: margin-inline-end slug: Web/CSS/margin-inline-end translation_of: Web/CSS/margin-inline-end ---
{{CSSRef}}{{SeeCompatTable}}
La propiedad de CSS margin-inline-end define el margen final lógico en línea de un elemento, que se asigna a un margen físico en función del modo de escritura, la direccionalidad y la orientación del texto del elemento. En otras palabras, corresponde a las propiedades {{cssxref("margin-top")}}, {{cssxref("margin-right")}}, {{cssxref("margin-bottom")}} o {{cssxref("margin-left")}} dependiendo de los valores definidos por {{cssxref("writing-mode")}}, {{cssxref("direction")}}, y {{cssxref("text-orientation")}}.
/* <length> values */ margin-inline-end: 10px; /* An absolute length */ margin-inline-end: 1em; /* relative to the text size */ margin-inline-end: 5%; /* relative to the nearest block container's width */ /* Keyword values */ margin-inline-end: auto; /* Global values */ margin-inline-end: inherit; margin-inline-end: initial; margin-inline-end: unset;
Se relaciona con {{cssxref("margin-block-start")}}, {{cssxref("margin-block-end")}}, and {{cssxref("margin-inline-start")}}, que define las otras márgenes del elemento.
{{cssinfo}}
La propiedad margin-inline-end toma los mismos valores de la propiedad {{cssxref("margin-left")}}.
<div> <p class="exampleText">Example text</p> </div>
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
margin-inline-end: 20px;
background-color: #c8c800;
}
{{EmbedLiveSample("Ejemplo", 140, 140)}}
| Especificación | Estado | Comentario |
|---|---|---|
| {{SpecName("CSS Logical Properties", "#propdef-margin-inline-end", "margin-inline-end")}} | {{Spec2("CSS Logical Properties")}} | Definición inicial. |
{{Compat("css.properties.margin-inline-end")}}