My current project involves creating two navigation bars. The first navbar at the top consists of just a brand logo, while the second navbar at the bottom serves as the main navigation menu. I want the top navbar to scroll off the screen when users scroll down, but I need the second (bottom) navbar to remain fixed at the top of the screen. Each navbar is set up as a separate component in my project.
If you'd like to see an example of this behavior, visit Reason.com: link
I'm having trouble figuring out how to implement this. I have tried using the following code:
<b-navbar toggleable="lg" class="header" fixed="top">
This code successfully keeps the 1st navbar fixed at the top, but it doesn't meet my requirements for the 2nd navbar. I've checked the documentation on placement options, which only includes fixed="top". Another option mentioned was using CSS property sticky:
position: sticky
However, this approach only works within the div and doesn't extend across components. Since I'm working with multiple components, I'm unsure how to properly apply this technique in Vue without carrying over a single div from one component to another.
Does anyone know how I can achieve the desired navbar behavior in my project?