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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:52:22+00:00 2026-05-14T02:52:22+00:00

I have a div element with fixed height and width and overflow:hidden, and I

  • 0

I have a div element with fixed height and width and overflow:hidden, and I have a menu that causes this div to scroll to anchors in the text within the div. However, when you click on an item on this menu, it doesn’t just scroll the div, it also scrolls the page to the div. How do I prevent this second from happening. That is, I just want the div to scroll without the page itself scrolling.

So I have
<div id=”boxcontent”>
<p id=”id1″>Some content</p>
<p id=”id2″>Some content</p>
<p id=”id3″>Some content</p>
</div>

boxcontent {
width:600px;
height:180px;
overflow:hidden;
margin-left:auto;
margin-right:auto;
}

And then a ul with anchor links to id1, id2, etc.

Does this make sense?

  • 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-14T02:52:22+00:00Added an answer on May 14, 2026 at 2:52 am

    Sounds like you need to prevent the default action of your links in your click event. event.preventDefault() may or may not work cross-browser, but the IEs should have an equivalent if you look.

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

Sidebar

Related Questions

I have a container div with a fixed width and height , with overflow:
I have a div with a fixed height and overflow:hidden; I want to check
I have a div that has the following css: position: fixed; height: 100%; left:
I have a containing div that is constrained in its height and width. It
I have a fixed position div with a fixed height/width. The div is positioned
Situation: I have two fixed-height divs, overflow set to hidden on both, and dynamic
We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on
I have a simple html page with a master div with fixed height (scrollable)
I have some dynamic text contained in a div that is set to whatever
I have a row (implemented with a div), which has a fixed width 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.