I am wondering what would be the best way to create a sticky top navigation bar? I’ve read that the
position: sticky is not supported by all browsers.
I have a main navbar which is under a smaller one, which I would like the main navbar to be sticky when the page scrolls. I’ve tried position: fixed, but when it scrolls, it leaves a gap where the bar above it is.
What would be the best way to create a sticky navbar under another?