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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:23:43+00:00 2026-05-29T15:23:43+00:00

I want to have 2 divs sized to a particular width (i.e. 500px). One

  • 0

I want to have 2 divs sized to a particular width (i.e. 500px). One above the other aligned horizontally.

The top box should hide its scroll bar, the bottom should show a scroll bar and when the user scrolls I’d like the offset of the top box to change to the value of the bottom box. So that when the bottom DIV scrolls horizontally it appears that the top DIV is also scrolling in unison.

I’m happy to do this in Jquery if it makes the process easier.

  • 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-29T15:23:44+00:00Added an answer on May 29, 2026 at 3:23 pm
    $('#bottom').on('scroll', function () {
        $('#top').scrollTop($(this).scrollTop());
    });
    

    Here we are using .scrollTop() for all it’s worth, getting the scrollTop value from the element with scroll-bars, and setting the scrollTop for the other element to sync their scroll positions: http://api.jquery.com/scrollTop

    This assumes that your bottom element has an ID of bottom and your top element has an ID of top.

    You can hide the scroll-bars for the top element using CSS:

    #top {
        overflow : hidden;
    }
    

    Here is a demo: http://jsfiddle.net/sgcer/1884/

    I suppose I’ve never really had a reason to do this, but it looks pretty cool in action.

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

Sidebar

Related Questions

I want to have 5 divs horizontally next to each other spanning the width
I have 2 divs and one is nested in the other. I want to
I want to have some divs stacked on top of one another, but act
I have two divs one above the other. The second on is absolutely positioned
I want to have 3 divs aligned inside a container div, something like this:
i have 2 divs next to each other i want mouseleave to fire when
I want to have an inner div that sites inside different sized container divs,
I have two divs that have 50% width each. I want to make it
I have two divs. I want one with id hor_rule to appear beneath the
I have 2 nested divs inside outer one, which has width:100%. Both nested divs

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.