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

  • Home
  • SEARCH
  • 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 7430541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:09:28+00:00 2026-05-29T09:09:28+00:00

I have a sidebar #sidebar { float: left; position: relative; width: 200px; padding: 20px;

  • 0

I have a sidebar

#sidebar {
    float: left;
    position: relative;
    width: 200px;
    padding: 20px;
}

and a main body:

#main {
    margin: 0 20px 0 260px;
}

I have a page which has the sidebar, and the main consists of a set of filters that should stay static, and a table that is both too tall and too wide to fit in the page. I would like to have the table in its own scrolling div, such that the div always extends to the right and bottom of the page and re-sizes if the page re-sizes. So far I have this:

  <div id="sidebar">
    <div class="boxed" id="menu">
      <h2 class="title">Main Links</h2>
      <div class="content">
        <ul>
          <li><a href="/">Main page</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div>
    <div id="main">  
      <h2>Header</h2>
      <div class="filters">
        Filters go here
      </div>
      <div style="overflow: auto;">         
        <table><!-- very large table --></table>
      </div>
    </div>
  </div>

This works perfectly, except for the case when the table is too tall to fit in the current page. What happens then is that the scrolling-div’s bottom scroll bar is not on the page. There is a main vertical scrollbar on the page, which, if I scroll all the way down, reaches the div’s horizontal scroll bar. I figure if the div never grows past the bottom of the page, I won’t have this problem.

What’s the best way to solve this issue? I tried doing this:

<div style="overflow: auto; position: absolute; top:0;right:0;bottom:0;left:0;">  

However, this just made the div stretch to fit the entire page, including the left sidebar.

  • 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-05-29T09:09:29+00:00Added an answer on May 29, 2026 at 9:09 am

    Your code sets the div to cover the entire page. Change it to reflect the width of your sidebar: (200px from the left and it looks like you want a 20px padding, so 220.)

    <div style="overflow: auto; position: absolute; top:0;right:0;bottom:0;left:220px;">  
    

    As for the bottom scrollbar, I suggest setting a “width:” for your table element.

    table {
        width: 700px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following basic layout: <div id=sidebar style=float: left; width: 250px; display block;></div>
I am usually using this code div#wrapper{width:900px; margin: 0 auto;} div#header{float:left; width: 900px;} div#sidebar{float:left;
I have two div columns sidebar(left) and page-content(right). I toggle removing and adding 'sidebar'
I have a sidebar that is floated left, and then a main content area
I have a sidebar and the various sections on a page. The sidebar floats
I have a web page with a fixed 200px column on one side (contains
I have a box that is width:600px i like to have text left, with
So I have a sidebar is left side ( 100px ) and then I
I have a sidebar that I want to behave like it's frozen on the
I have a sidebar navigation that lists blog entry titles down the side 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.