As far as I know the 'height' property in CSS is not inherited by default, so how is the height of an element determined when it is not specified?
Asked
Active
Viewed 27 times
0
-
By the content inside it? – Alon Eitan May 29 '21 at 08:44
-
For block elements: By its content. For inline elements: By its content, or by the line height. – connexo May 29 '21 at 08:44
-
@connexo it may sounds strange but it's the opposite, for block element, it's the line-height that will dictate the height and for inline element, it's the content and line-height will not affect their height. – Temani Afif May 29 '21 at 08:51