CSS margin-inline-end property

Description

It is a logical property that defines space at the end side of an inline box. The selection of start side depends on the writing-mode.

  • It behaves like margin-right for the horizontal-tb writing mode.

  • It behaves like margin-bottom or margin-top for the vertical-lr and vertical-rl writing-mode respectively.

Change the direction of flow of text.

horizontal-tb vertical-lr vertical-rl

Syntax

margin-inline-end : length

Property values

0 lengthDefault

There is no thickness of the margin area at the end side of the border box.

margin-inline-end: 0;

+ve length

+ve value represents margin area at the end side of a block.

margin-inline-end: 20px;

-ve length

The space decreases by 20px at the end of inline i.e the the subsequent content may merge into the element.

margin-inline-end: -20px;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
Check the behavior of margin-inline-end for different values of writing mode.
content after the inline
×

Ctrl+D