My markdown looks something like this:
<body>
<header>
<div class"logo" />
<div class"contact-info" />
<div class="sticky-navigation"/>
</header>
<main>
</main>
</body>
I need to make the div with the class sticky-navigationbehave like sticky navigation when the user scrolls the body. Is there a way to use position:stickyto do the same?
As far as I have seen, usage is position:stickyhighly dependent on markup and will only work on everything <header/>.
source
share