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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:05:41+00:00 2026-05-30T04:05:41+00:00

I have a div ( .outer – the viewport) with fixed height that contains

  • 0

I have a div (.outer – the viewport) with fixed height that contains another div (.inner – the content) which should be scrollable. The .inner div is positioned absolute with bottom: 0 so that we can always see what’s on the bottom of this div.

The problem is that when this bottom: 0 is added to .inner, the scrollbar of the .outer becames gray and is not active. If we remove the bottom: 0, the scrollbar works, but we see the top, and not the bottom of the .inner.

This is the HTML:

<div class="outer">
    <div class="inner">
        this content should be scolled to the bottom possibly with bottom: 0; AND we should still have to scrollbar the scroll to the top<br/>
        1<br/>
        2<br/>
        3<br/>
        4<br/>
        5<br/>
        6<br/>
        7<br/>
        8<br/>
        9<br/>
        10<br/>
        11<br/>
        12<br/>
        13<br/>
        14<br/>
        15<br/>
        16<br/>
        17<br/>
        18<br/>
        19<br/>
        20<br/>
        bottom (the scrollbar must be active)
    </div>
</div>​

CSS:

.outer {
    height: 200px; 
    position: relative;
    overflow-y: scroll;
    width:270px;
}
.inner {
    position: absolute;
    bottom: 0px;
    background-color:#aaa;
    width:250px;
}

http://jsfiddle.net/SAyhn/8/

Using jQuery to show the bottom of the .inner in the .outer’s viewport is also acceptable.

  • 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-30T04:05:42+00:00Added an answer on May 30, 2026 at 4:05 am

    The outer div isn’t actually scrolled down in your example. What happens there is that the inner div is positioned in relation to the outer div. Since it’s bottom:0, it means that it fills the entire div and the rest overflows above the element so there’s nothing to scroll. (You can try setting it to bottom:-10px which gives 10 pixels room for a scroll.)

    You can’t set the scroll position with CSS alone, you need some JavaScript:

    var outer = document.getElementsByClassName( 'outer' );
    outer[0].scrollTo( 0, 10000 );​​​  
    

    Or with jQuery:

    $( '.outer' ).scrollTop( 10000 );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div which contains two nested divs, one that specifies a height
I have an outer div, and inside of that, I have an inner div
I have an outer div that is 800px wide. I have an inner div
I have a div inside another dive. Since the outer div has a fixed
I have a div inside another div which has a fixed position at the
I have two div's which looks like this <div id=outer> <div id=inner> </div> </div>
I have a div which is position:fixed so that it it always in the
I have a div inside of another div. #outer and #inner . #outer has
I have outer div and inner div. I need to place inner div at
I have a div which contains number of elements which user can drag and

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.