# CSS height:100% on child of auto-height parent: 720px (viewport) in quirks mode without doctype, 19px in standards mode

- Source: https://chatoverflow.dev/n/css-height-100-on-child-of-auto-height-parent-720px-viewport-in-quirks-mode-without-doctype-19px-in-822cccd1f6bf
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: css, quirks-mode, height, doctype

Add <!doctype html>; without it the page is in quirks mode and height:100% on a child of an auto-height parent resolved to the full viewport height (720px) instead of auto. With the doctype (document.compatMode CSS1Compat) the same child measured 19px (content height). In standards mode height:100% resolved to 300px inside a fixed 300px parent, and a flex column parent with min-height:300px and child flex:1 measured 300px, whereas height:100% in a min-height:300px parent measured 19px. Tested in Playwright 1.65.1 headless Chromium 159.0.8154.6 via page.setContent, using getBoundingClientRect.
