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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:46:25+00:00 2026-05-20T21:46:25+00:00

Say there is a page: <html><body> <div style=position: relative;> <div style=position: absolute; left: -30px;>LEFT</div>

  • 0

Say there is a page:

<html><body>
<div style="position: relative;">
  <div style="position: absolute; left: -30px;">LEFT</div>
  <div style="position: absolute; right: -30px;">RIGHT</div>
<div>
</body></html>

Why the horizontal scrollbar only accounts for the RIGHT overflow?

In other words, why LEFT triggers no scrollbar, while RIGHT does?

Is there a way, other than body -> overflow: hidden, for RIGHT not to trigger the scrollbar?

Edit:

What I try to achieve is a wrapper in the middle of page (like any other “content” pane out there – basically div -> margins: 0 auto;. This should trigger horizontal scrollbar if the screen is too small. Then, and this is the problem, I want another div’s to “stick outside” of the wrapper – these should not trigger the scrollbar.

Edit 2:

<html><body>
<div id="wrapper" style="position: relative; margin: auto; 
  width: 400px; height: 200px; background-color: red;">
  <div style="position: absolute; left: -30px;">LEFT</div>
  <div style="position: absolute; right: -30px;">RIGHT</div>
<div>
</body></html>

When the screen is wide enough, everything’s fine. But as I try to shrink the screen, all of sudden a horizontal scrollbar appears. The problem is, it only allows to scroll to see RIGHT, and not LEFT. Is the a way to for the scrollbar not to appear until the wrapper, and only the wrapper, is larger than the screen?

  • 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-20T21:46:26+00:00Added an answer on May 20, 2026 at 9:46 pm

    After your clarification, I understand the problem.

    You can get around it by adding a wrapper element, and giving that overflow: hidden, and a min-width.

    Live Demo

    HTML:

    <div id="outerContainer">
        <div id="container">
            <div id="left">left</div>
            <div id="right">right</div>
            text
        </div>
    </div>
    

    CSS:

    html, body {
        margin: 0; padding: 0; border: 0
    }
    
    #outerContainer {
        overflow: hidden;
        min-width: 300px
    }
    #container {
        margin: 0 auto;
        width: 300px;
        background: #ccc;
        position: relative
    }
    
    #left, #right {
        position: absolute;
        background: #666;
        width: 60px
    }
    #left {
        left: -60px
    }
    #right {
        right: -60px
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following HTML page: <html> <head> <title>WatiN Test</title> </head> <body> <div> <p>Hello World!</p>
I have one page(say jobs.html) with an iframe loads another page( say joblist.html).There is
Let's say there is a page with 100 different user photo's shown on the
Is there a way to have lightbox on page load?? Say like when the
Say there is a css style declaration to an element which has been set
Say I have one full-page form, but within the form, there are two or
I have two websites, let's say they're example.com and anotherexample.net . On anotherexample.net/page.html ,
Is there a way to close Chrome Tab from within a html page? What
There is one div which changes frequently it's innerHTML by ajax. Once the page
Say I have a HTML page that looks like this: That was created with

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.