If the height of the containing block is not specified explicitly
But then you don’t go on an say what happens if the height of the containing box IS defined. What happens then to the height of the element when it is set to 100%?
]]>A div containing two floating divs, each of height 100px, the height of the div container is 0. A good explanation with a demo is available at this link: https://devserver-002.info/floating_div_scam//floatdemo/
]]>That sentence in the article is obviously a mistake. No one has time to proof-read (or look at comments on years-old articles), and it already got our click-through…
See https://www.w3.org/TR/CSS21/box.html#box-dimensions
And a better referencefor “content height” than the url the article links to would be https://www.w3.org/TR/CSS21/visudet.html#the-height-property
The existence of ‘box-sizing: border-box’ means we can’t unqualifiedly say “content area is defined by (or as) width and height properties…” And anyway “defined as” is not the same as “defined by”. But for the default (equiv to box-sizing: content-box) that’s about good enough. Especially since “content area” doesn’t seem to be defined precisely in the spec., so best to stick with things that are, like height, width, and padding. I don’t know what the author exactly meant to write, but a conceptual definition of “content area” could be “the area inside the padding”.
:q!
]]>Yup, I am also confused by that statement. I think that wrong or needs to be phrased better.
]]>