CSS block-size property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerNot supported
EdgeNot supported
OperaFully supports
Description
CSS block-size property is a logical property and represents height or width for an element. The selection of height or width depends upon the writing-mode.
The block-size represents height for the horizontal-tb writing-mode.
The block-size represents width for the vertical-* writing-mode.
Change the direction of flow of text.
horizontal-tb vertical-lr vertical-rl
Syntax
block-size : auto | +ve length
Property values
autoDefault
-
auto value means the size will be changed automatically according to the content.
- Try it
block-size: auto;
Applicable to
It applies to all elements except non-replaced inline.