Height | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Height

Why i can't use percentages to define height of block level element?

14th Dec 2019, 9:39 AM
Unknown Ambusher 🗡️
Unknown Ambusher 🗡️ - avatar
1 Answer
+ 1
Using percentages for height should work for block elements, but the height then depends on the height of the containing block: https://developer.mozilla.org/en-US/docs/Web/CSS/height
14th Dec 2019, 11:36 AM
Aaron Eberhardt
Aaron Eberhardt - avatar