JavaScript Alternative to 100vh for fixed positioned element?

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)?

Answer:1

I am having a premium channel on vimeo. I am trying to put a list of videos and their duration on my website. They have an example by using the event listeners. But as I am interested in simple text ...

I am having a premium channel on vimeo. I am trying to put a list of videos and their duration on my website. They have an example by using the event listeners. But as I am interested in simple text ...

  1. video duration using ffmpeg
  2. get video duration using jquery
  3. get video duration using ffmpeg
  4. get video duration using php
  5. get video duration using javascript
  6. get video duration using python
  7. duration using video

I have spent many hours trying to figure out what is preventing the jQuery autocomplete function from working so would really appreciate any help. I am getting the following error in IE and a similar ...

I have spent many hours trying to figure out what is preventing the jQuery autocomplete function from working so would really appreciate any help. I am getting the following error in IE and a similar ...

I have the next chain of ajax calls: ajaxCall1().then(function(){ ajaxCall2(). then(function(){ ajaxCall3().then(function(){ .... }) }) }) As you can see I am not ...

I have the next chain of ajax calls: ajaxCall1().then(function(){ ajaxCall2(). then(function(){ ajaxCall3().then(function(){ .... }) }) }) As you can see I am not ...

need help with little thing. I've searched current question, but didn't find good example. I have two arrays with same count of objects: array1 = [{ id: 1, name: 'Johnny'}, { id: 2, name: 'Mike'}]; ...

need help with little thing. I've searched current question, but didn't find good example. I have two arrays with same count of objects: array1 = [{ id: 1, name: 'Johnny'}, { id: 2, name: 'Mike'}]; ...

  1. concat arrays into
  2. merging two arrays into one
  3. append into arrays