w3schools says that for height
:
auto : The browser calculates the height. This is default
But what does “browser calculates the height” mean? Does it mean it just simply sums up the contained elements’ heights? Is this always calculated with the same method for all browser?
What does it mean browser calculates the height?
It means the browser will make the element's height sufficient to fit its content.
Does it mean it just simply sums up the contained elements heights if they are up on each other?
Nope, it is more complicated than that, but I'm sure that is part of it.
Is this always calculated with the same method for all browsers?
No, there are generally small variances. You should calculate the element's height in JavaScript if you intend to perform calculations based on it, don't assume it will have the same height on all browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With