Sorry if this question seems a bit confusing, but I just can't seem to find the right words to explain it! What I'm trying to achieve is having a div element always be 80% of the height of the page, while also being perfectly square in shape. In other words, I want the width of the div to match that of 80% of the page's height, creating a square shape. Despite my efforts in researching, I haven't been able to find a solution yet. Ideally, I would prefer using CSS only for this task, but I am open to using JavaScript as well if needed. Here is an example of how I envision my layout at different page heights and aspect ratios: MY PAGE LAYOUT
The blue div should always be 80% of the page height and should remain square in shape. I require this functionality because I aim to have a page without any scrollbars, which means the div needs to adjust based on the page height while maintaining a perfect square shape.
Thank you!