What Is CSS? - How Do Width and Height Work?

Tell us what’s happening:

The auto height properties makes the box disappear completely in first code example.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Challenge Information:

What Is CSS? - How Do Width and Height Work?

Probably because the box is empty.

If I add text to the div element, with the height set to auto, the height adjusts to the minimum height for that text:

This seems to correspond to the sentence two lines above:

Similarly, the height is auto by default, which means it will adjust to the content inside.

I look in this documentation, and it seems to be the same behavior:

So I deduce that unlike the auto width, which corresponds to the maximum width, the auto height corresponds to the minimum height.
I hope I’m not talking nonsense.

If I remember correctly, there are also differences in the behavior of margins in height and width; they can merge in one direction and not in the other.