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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:32:52+00:00 2026-05-25T00:32:52+00:00

I actually have a div with a staticheight and 100% width. Currently this div

  • 0

I actually have a div with a staticheight and 100% width. Currently this div has overflow:auto so there is a vertical scrollbar.

But for this project it’s necessary to have this div without any scrollbars. So I have two buttons – one at the div’s top and one at the end for scrolling. But until now I was unable to find a solution to make the div scrolling (for several px OR scrolling while mouseover) using this buttons.

(I’m commonly using jQuery, but weren’t able to use it’s scrollTop()-Method)

So please help me!

  • 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-25T00:32:53+00:00Added an answer on May 25, 2026 at 12:32 am

    I’d expect scrollTop to be just what you were looking for (though I would argue against this user experience barring a really good reason to be this non-standard).

    It works for me (live copy):

    CSS:

    #theDiv {
      height: 10em;
      overflow: hidden;
      border: 1px solid #ddd;
    }
    

    HTML:

    <input id="btnDown" type="button" value="Down">
    <input id="btnUp"   type="button" value="Up">
    <div id="theDiv"></div>
    

    JavaScript w/jQuery:

    jQuery(function($) {
      var theDiv;
    
      theDiv = $("#theDiv");
      fill();
    
      $("#btnDown").click(function() {
        theDiv.scrollTop(theDiv.scrollTop() + 10);
      });
      $("#btnUp").click(function() {
        var top = Math.max(theDiv.scrollTop() - 10, 0);
        theDiv.scrollTop(top);
      });
    
      function fill() {
        var n, s;
    
        s = "Line 0";
        for (n = 1; n < 20; ++n) {
          s += "<br>Line " + n;
        }
        theDiv.html(s);
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so i have 4 divs (i actually have many more but this will simplify
I have a messy html that looks like this: <div id=:0.page.0 class=page-element style=width: 1620px;>
I have this div which acts a lens in zooming of the image. But
Is it possible to have 100% height but have the div fill out the
I have a div with 1000 images in it with overflow:auto set. It is
I actually have an answer to my question but it is not parallelized so
I actually have two questions regarding the same problem but I think it is
This is a minimal test case of some code that I actually have. It
Actually I have two questions. (1) Is there any reduction in processing power or
I have a DIV in the center of my page which has margin-left 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.