https://i.sstatic.net/PchVf.png
Using Chrome DevTools, I removed unnecessary elements from the DOM.
The body is set to relative and takes up all available space in the document, which is exactly what I want.
https://i.sstatic.net/AzELV.png
My toolbar is also set to relative and adjusts to the height I desire:
https://i.sstatic.net/BlMqJ.png
The issue arises with my <main>
element
This element is set to relative with a property of height: 100%
. According to my understanding, <main>
should fill 100% of its parent. In this case, the parent element is body
, so <main>
should take up the available space.
However, in my scenario:
https://i.sstatic.net/0YLbL.png
The <main>
element has a height of 0.
Could you explain why this is happening? And share how I can make the <main>
element occupy the available space?
Thank you