CSS min-block-size property

Description

CSS min-block-size specifies the minimum block-size of an element.

  • It behaves like min-width for the horizontal-tb writing mode.

  • It behaves like min-height for the vertical-* writing-mode.

Change the direction of flow of text.

horizontal-tb vertical-lr vertical-rl

Syntax

min-block-size : none | min-content | max-content | +ve length | +ve percentage | auto

Property values

noneDefault

No limit of block-size is applied to an element.

min-block-size: none;

min-content

min-content value specifies that the minimum block-size of element must be equal to or greater than the largest minimum block-size of some descendant item.

min-block-size: min-content;

max-content

max-content value represents that the minimum block-size of element must be equal to or greater than the largest maximum block-size of some descendant item.

min-block-size: max-content;

+ve length

The block-size of element should be at least 300px.

min-block-size: 300px;

+ve percentage

The block-size of element should be at least 30% of the parent box.

min-block-size: 30%;

auto

auto value means the block-size will be changed automatically according to the content.

min-block-size: auto;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 

This is the first child element.

This is the second child element.

×

Ctrl+D