Height property
A height property specifies or reports an element’s vertical dimension.
CSS in Depth, Second Edition
The height property specifies the vertical extent of an element's content box or other applicable box.
- How it is used
- Guides vertical sizing in normal flow, viewport layouts, positioned elements, and animated dropdowns.
- How deep it goes
- Explains content-driven sizing, percentage-height failure, positioned elements, and JavaScript-assisted transitions, stopping short of full layout internals.
- Examples
- Uses full-screen containers, equal-height columns, fixed navigation, and a dropdown transitioning between zero and measured height.
- What you can do after
- Apply height safely in CSS and coordinate explicit pixel values with JavaScript when animating content-dependent dimensions.
Read how CSS in Depth, Second Edition explains height property →
Tiny CSS Projects
The CSS height property specifies the height of an element's box.
- How it is used
- Uses height to size visible UI parts and keep card content and share-link shapes aligned.
- How deep it goes
- Works through fixed pixel heights and one calculated percentage height, without explaining height-sizing internals.
- Examples
- Shows a 270px credit card, a 50px strip, a calculated-height card panel, and 48px square share links.
- What you can do after
- Apply it via CSS declarations to size card details, align card content, and make square share links.
Web Design Playground, Second Edition
The CSS height property specifies the vertical size of an element's content box or replaced content.
- How it is used
- Controls element dimensions while teaching box-model sizing and responsive image behavior.
- How deep it goes
- Explains units, display behavior, fixed-height cautions, and image proportions, but stops short of advanced height calculations.
- Examples
- Uses block-level text elements, inline elements, and fluid img rules as concrete sizing examples.
- What you can do after
- Apply height to size block elements cautiously and preserve image proportions with height: auto.
Read how Web Design Playground, Second Edition explains height property →
Web Design Playground
A CSS property that sets an element's vertical size.
- How it is used
- Controls block-level element height when overriding the browser’s content-based sizing, while supporting responsive image sizing.
- How deep it goes
- Explains defaults, units, inline limitations, responsive images, and risks of fixed text heights without detailing the full box model.
- Examples
- Uses block and inline element behavior, fixed measurements, auto sizing, and fluid images as practical examples.
- What you can do after
- Apply height with CSS units, choose auto for content-driven sizing, and create responsive images with height auto.
Also covered in
What to know first
- borderA CSS border is the visual edge surrounding an element’s content and padding areas, defined by properties such as width, style, and color.
- inline containerAn inline container is an HTML element that participates in inline layout, flowing with surrounding content and potentially wrapping within its containing block.
- autoauto is a CSS keyword whose value is determined by the relevant property’s rules, layout algorithm, available space, and content.
- block-level elementA block-level element is an HTML element that participates in block layout, typically starting on a new line and occupying the available width of its container.
Related concepts
- autoconfigured by · auto is a CSS keyword whose value is determined by the relevant property’s rules, layout algorithm, available space, and content.
- calc()configured by · The CSS calc() function evaluates an arithmetic expression involving compatible CSS values and units to produce a computed value.
- fluid imageconfigures · A fluid image is an image whose rendered dimensions adapt to available layout space while preserving its proportions and size constraints.
- getBoundingClientRectproduced by · getBoundingClientRect is a DOM method that returns an element's size and position relative to the viewport.
- offsetHeightmeasured by · A DOM element property that reports an element's layout height in pixels, including padding and borders in the browser's box model.
- proportionused by · A ratio expressing a quantity relative to a whole or reference quantity, commonly represented as a fraction, decimal, or percentage.
Questions about height property
What is height property?
A height property specifies or reports an element’s vertical dimension.
Which Manning books explain height property?
CSS in Depth, Second Edition, Tiny CSS Projects, Web Design Playground, Second Edition and Web Design Playground.
What should I know before learning height property?
Manning books that teach height property usually introduce border, inline container, auto and block-level element first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



