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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:35:25+00:00 2026-05-26T16:35:25+00:00

I have a div with a scroll bar which displays 15 months with 3

  • 0

I have a div with a scroll bar which displays 15 months with 3 of the min each row, When the page loads I want to fix the scroll bar position to 2nd row as shown in my screenshot.As in the scroll bar should to be fixed to the position shown in my screenshot as opposed to top of the div.The reason for this requirement is we are displaying previous 3 months, but the user should see the current month when the page loads. I hope I have made it clear enter image description here

I am using

<div id="key_dates" style ="overflow:scroll;width:960px;height:500px">

Can you guys please help?

Thanks,
Adarsh

  • 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-26T16:35:26+00:00Added an answer on May 26, 2026 at 4:35 pm

    You need to use JavaScript for this:

    <!-- 
         Place this script before closing </body> tag so that
         DOM (HTML elements tree) is already built when the script is running 
    -->
    <script>
    // create a closure to not pollute global scope
    !function () {
      // cache reference to keyDates element
      var keyDates = document.getElementById('key_dates');
      // set scroll to the height of one row
      keyDates.scrollTop = 150; // substitute `150` with height of one row
    } ();
    <script>
    

    Here is the documentation of element.scrollTop

    If you are using jQuery, you do it like this (and here are the docs);

    <script>
    $('#key_dates').scrollTop( 150 );
    </script>
    

    An example with jQuery: http://jsfiddle.net/gryzzly/CjdwX/

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

Sidebar

Related Questions

I have a div (sub area of page with scroll bar) that has some
I have a div which has a max height and a scroll bar on
I have a div positioning working which gets fired by the scroll-event. What happens
I have set a fix height of DIV and set its overflow-y:scroll but the
if have the following code: <div id=container style=position:relative; width:300px; height:300px; overflow:scroll;> <div id=header> </div>
I have a div in which a page is loaded with the DojoX Layout
Hi I have the container div set for displaying horizontal and vertical scroll bar
I have a jQuery draggable container div with a side scroll bar that should
I have a page with two div s on it which should fill the
I have used the scroll bar which is extracted from this site http://jscrollpane.kelvinluck.com/arrow_hover.html .

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.