Web4College

CSS margin-block-end property

src

Description

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

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

  • It behaves like margin-right or margin-left 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-block-end : length

Property values

0 lengthDefault

0

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

margin-block-end: 0;
Try it

+ve length

20

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

margin-block-end: 20px;
Try it

-ve length

-20

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

margin-block-end: -20px;
Try it

Applicable to

It applies to all elements