CSS margin-inline property

Description

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

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

  • It behaves like margin-right and margin-left for the vertical-* writing-mode respectively.

Change the direction of flow of text.

horizontal-tb vertical-lr vertical-rl

Syntax

margin-inline : margin-inline-start    margin-inline-end

Property values

20px

Both the margin-inline-start and margin-inline-end are 20px.

margin-inline: 20px;

20px 40px

The margin-inline-start and margin-inline-end values are 20px and 40px respectively.

margin-inline: 20px 40px;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
Check the behavior of margin-inline-start for different value of writing mode.
content after the inline
×

Ctrl+D