we’re working on a project, that needs to be fully responsive. We used “position fixed” to make the header sticky. Of course that makes the content positioned behind the header.
Now here’s where it gets complicated: The header is responsive and changes its height relative to the viewport.
We tried a common way to use jQuery to take the height from the header and that value is added as top margin for the content. This works great so far but when using more than one scene it gets buggy. When looking at the second scene the jQuery tries to take the height from the header from the first scene which is 0.
The code being used:
Is there a way to take the value just from the current scene? Or does someone else maybe have a better solution?
Thanks in advance.