Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8138629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:33:14+00:00 2026-06-06T11:33:14+00:00

What I must change to make the navigation bar fixed when screen size under

  • 0

What I must change to make the navigation bar fixed when screen size under 940px? I don’t want to make it responsive. If you resize your browser windows under 940px you will see that scroolbar-x (bottom-scrollbar) appear, but when you scroll it to the right, the navigation bar position still fixed, and some menu won’t appear.

TwitterFacebook

Maybe some picture will explain what my problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:33:17+00:00Added an answer on June 6, 2026 at 11:33 am

    This can’t be done in CSS alone.

    The example you give (Twitter) has the navbar with fixed position AND fixed size at all screen sizes. Fixed position means that the scrollbars will not affect the position of the navbar, and this is why you can’t use the x-scrollbar to see the part of the navbar which, once it’s less than 940px wide, is hidden ‘under’ the right border of the browser window.

    So you have to choose, either

    1. Have a fixed position, fixed size navbar which is present at the top no matter how far the user scrolls down and accept that under a small enough screen they won’t be able to scroll horizontally to see it all, OR
    2. Have a fixed position, fluid size navbar which adjusts its width to accommodate different screen sizes, which will hopefully mitigate the need to scroll horizontally in the first place, especially if you let it grow vertically if its contents don’t fit in one row, OR
    3. Have a non-fixed position, fixed size navbar which will respond to horizontal scrolling but will not be ever-present when the user scrolls down the page.

    Effectively, you can’t have position work one way in the x direction and another in y.

    You can see what I mean by option 2 by editing the following classes in the Twitter page using the CSS inspector:

    .global-nav .container {
        width: auto;
        max-width: 865px;
    }
    .global-nav, .global-nav-outer {
        height: auto;
    }
    

    The second selector implements the vertical fluidity for once the contents can’t fit in one row.

    You can see what I mean by option 3 by making these changes:

    .topbar {
        position: absolute;
        /* ... the rest as is */
    }
    

    EDIT

    Of course, that it can’t be done in CSS doesn’t mean it can’t be done at all. Here’s a jsfiddle implementing that script you mentioned. This uses MooTools as opposed to jQuery, which I normally use with bootstrap.

    The fiddle: http://jsfiddle.net/uadDW/4/
    Full screen version to better see the effect: http://jsfiddle.net/uadDW/4/show/

    (Thanks to @Sherbrow for providing the base fiddle with which I made this one).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make realtime change in HTML documents. When the variable changed with
Sometimes for testing/developing purposes we make some changes in the code that must be
I'm using ASP.NET Roles with a special role Must Change Password. If a user
It must be a somewhat common event to change the name of a property
I must be missing something obvious here... I can't get .change() to fire on
Is there any way to change default font of controls in winforms. I must
I want to make an input form in Java so that the user can
If I make a change in my ASP.NET project using VS2008 or VS2010, I
If I want to make a .NET assembly usable as a COM server I
I have an operation (That I can't change) that starts threads that make calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.