matthewjohn938 Posted February 16, 2019 Share Posted February 16, 2019 What is the best way to create a sticky top navigation bar? Under a smaller navbar, I have a main navbar and I want the main navbar to be sticky when the page scrolls. I have tried (position: fixed), but when it scrolls, it leaves a space where the bar above it is. Could you please suggest me the best way to do this? Thanks Quote Link to comment Share on other sites More sharing options...
Sarah Alfred Posted February 19, 2019 Share Posted February 19, 2019 I would recommend you to visit W3school from there you will find the code for this,because few days back I also had a same problem and W3school came to the rescue. Thanks matthewjohn938 1 Quote Link to comment Share on other sites More sharing options...
matthewjohn938 Posted March 8, 2019 Author Share Posted March 8, 2019 On 2/19/2019 at 3:12 PM, Sarah Alfred said: I would recommend you to visit W3school from there you will find the code for this,because few days back I also had a same problem and W3school came to the rescue. Thanks Thanks for your suggestion.. I visited the W3school and got the solution.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.