The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Make a Sticky Navigation Bar

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #297738

    Hey fellow community members,

    I am trying to make a HTML navigation bar to be fixed while the users scrolls down the page but when I try to fix the position of the navigation bar the result is something like this:


    i.e. the elements are wrapped around each , while what I want is to space them evenly. Just like this:

    Overview About Experience Education Certifications

    The interesting thins is that when i remove the ‘position:fixed;’ then the OUTPUT seems to be as per my needs but the navigation bar is still not fixed.

    Here is the link to my CodePen:

    Can anybody Suggest Something?


    My guess is that when you added position:fixed you didn’t set a width so it collapsed to just the size of the contents.

    Just include width:100%.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.