Hero Image Question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hero Image Question

https://www.w3schools.com/howto/howto_css_hero_image.asp On this website guide, the code shows that the Html and body element needs to have 100%. I don't understand why?? Shouldn't the body element by default take up 100% height or width of the screen???

6th Jun 2019, 3:49 PM
J3fro C
J3fro C - avatar
1 Answer
0
I don't want to copy and paste and act like I know what I'm talking about lol, but this page explains it. I give credit to the author. There is an aside area on the page where you can give him thanks. https://makandracards.com/makandra/39473-stretching-an-html-page-to-full-height
6th Jun 2019, 9:29 PM
Chris Coder
Chris Coder - avatar