I am working on a website design that consists of two main parts: the top
section where the menu is located, and the content
section which contains the information.
.wrap {
position: absolute;
width: 100%;
height: 100%;
}
.box {
display: flex;
flex-direction: column;
height: 100%;
}
.top {
flex: 0 1 auto;
}
.content {
flex: 1;
position: relative;
height: 100%;
}
<div class="wrap">
<div class="box">
<div class="top"></div>
<div class="content"></div>
</div>
</div>
The menu should take up as much space as necessary for the menu content, while the content should fill the remaining space on the site. Together, they should occupy 100% of the width and 100% of the height.
This setup functions properly on desktop computers, but on mobile browsers like Chrome, Firefox, and Safari, the height of the site increases to accommodate the height of the menu.
The content extends beyond 100% due to the inclusion of the menu. Can someone please help me understand what I may be doing incorrectly in this scenario?