My div has a height set to 100%, but I am encountering an issue when resizing the window vertically (see the nav-bar on the left):
https://i.sstatic.net/4LocO.png
To see the problem in action, check out this jsfiddle: https://jsfiddle.net/uygxjbr2/2/
The problematic CSS for the element is as follows:
.nav {
/* position: fixed; */
width: 250px;
height: 100%;
min-height: 100%;
}
.nav ul {
list-style-type: none;
display: flex;
flex-direction: column;
justify-content: flex-start;
padding: 40% 0;
height: 100%;
color: #fff;
background-color: #40404a;
}
I have experimented with using /* position: fixed; */
, but that results in ruining the overall layout of the page.
Additionally, there seems to be another issue where the top part of the .upper-page
disappears upon vertical window resize, making it impossible to scroll.
Can you suggest any solutions to these problems?