I have a div (top navigation)
that is nested inside a flex
container. When the top-nav
expands, I want it to occupy the full height of the viewport. I know this can be achieved by setting a height of 100vh
but it is not widely supported. So, I need a more traditional way to achieve this.
The html
and body
have a height 100%
but the content of the view overflows and I can scroll the page.
What I have right now is:
.top-nav .top-nav-links-wrapper {
position: fixed;
width: 100%;
background-color: #fff;
top: 50px;
left: 0;
height: 100%;
}
Is there a way to achieve this (apart from setting height to 100vh
)?