The height property sets the box height. With box-sizing: content-box (default) — specifies content box only. With border-box — includes padding+border. Percentages relative to parent height..box {
height: 200px;
}.responsive {
height: clamp(100px, 50vh, 500px);
}min:0max:9999step:1units:px | % | em | rem | vh | vw | autoautoThe default value. Browser determines based on content.min-contentMinimum size content needs.max-contentMaximum size content needs.fit-contentFits content.stretchStretches to fill parent.fit-content()Fits content up to a limit.calc()Mathematical calculation.min()Minimum of values.max()Maximum of values.clamp()clamp(min, val, max).CSS Box Sizing Module Level 4Editor's Draft<length-percentage>W3CMDNCSSShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext