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 8050905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:11:11+00:00 2026-06-05T07:11:11+00:00

See this webpage . First try scroll it, see that the left bar remains

  • 0

See this webpage.

  1. First try scroll it, see that the left bar remains fixed.
  2. Resize the height of your window, so that not all of the content of the left bar is visible. Now scroll. This time, the left bar is not fixed.

In this page, there is a jquery that calculates height of left bar, compares it to the window-height and then makes the left bar position fixed or absolute.

However, I’m wondering if something similar is achievable through just HTML and CSS, not using jQuery or similar.

Any suggestions?
In short what I’m looking for is a bar with content that remains fixed, but is scrolled if the content overflows. But the scrolling should be together with the whole page.

  • 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-05T07:11:12+00:00Added an answer on June 5, 2026 at 7:11 am

    You can use media queries to direct CSS at certain screen sizes (and other things too) so you could use one stylesheet if the screen is too small. I’m no expert so no examples, but take a look here http://css-tricks.com/css-media-queries/ . Sorry! but guess you figured it out 🙂

    Edit: The working result is this:

    #leftnav {
        /* default look */
        width: 300px;
        position: fixed;
        top:0;
        height: 100%;
    }
    
    /* set the size at which the content is clipped and we cannot have fixed position */
    @media all and (max-height: 500px) {
        /* things inside here will only have an effect if the browser window shows
           less than 500 px in the height, so here I apply the special rules */
        #leftnav {
            position: absolute;
            height: auto;
            /* etc.. */
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pls see this first: Good Coding Practices So, this is my design. Website 2.Business
Can you guys reading this please try my code and see if it works
I had my webpage validated for xhtml transitional till I added this table (see
see this demo from jquery ui you have to hold down the Ctrl key
See this code: var jsonString = '{id:714341252076979033,type:FUZZY}'; var jsonParsed = JSON.parse(jsonString); console.log(jsonString, jsonParsed); When
See this Image below http://i46.tinypic.com/2pt6jkn.jpg This is report in SSRS as shown when it
See this example! int main( int argc, char ** argv ) { int *ptr
I see this is possible using jQuery, but how can it be done in
please see this question. The initial question was solved, and I have a method
I see this line from the c++ reference for cstdio : Every element of

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.