Forums

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
    Posts
  • #297738
    manish169
    Participant

    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:

    OverviewAboutExperienceEducationCertifications

    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:

    https://codepen.io/Manish169/pen/ExxWoKy

    Can anybody Suggest Something?

    #297740
    Paulie_D
    Member

    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%.

    https://codepen.io/Paulie-D/pen/MWWpQNX

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