Results for “height”
Small, practical examples. Search by task or narrow things down below.
Clip content that exceeds a fixed-height box
CSS: Overflow hidden clips the painted content while the full content remains in the DOM.
CSS✓ Tested
Give implicit grid rows a minimum height
CSS: Minmax allows an implicit row to grow when its content requires more room.
CSS✓ Tested
Set explicit grid row heights
CSS: Grid-template-rows controls each declared row’s block-axis track size.
CSS✓ Tested
Size a panel relative to viewport height
CSS: Viewport height units track the browser viewport rather than the parent element.
CSS✓ Tested
Set readable line spacing
Use a unitless CSS line-height that scales with the font size.
CSS✓ Tested
Set space between text lines
CSS: Learn how to set space between text lines in a complete browser example.
CSS✓ Tested
Keep a tall section inside a local vertical scroller
CSS: A bounded height and overflow auto keep long content from stretching the surrounding page.
CSS✓ Tested
Preserve an aspect ratio
Reserve a 16:9 CSS box without a fixed height.
CSS✓ Tested
Reserve an image’s display dimensions
HTML: Width and height attributes supply a known display size and aspect ratio before decoding finishes.
HTML✓ Tested
Rotate a rectangular box around its center
CSS: A ninety-degree transform swaps the visible bounding-box width and height.
CSS✓ Tested