Skip to content

unexpected scrollable area with right:-Xpx + overflow:hidden #9309

Closed

Description

@paulrouget

hzccltqmrh

Even though the container has overflow: hidden, it's still scrollable. Note: overflow content is not visible, only body is visible.

<style>
  body {
    margin: 0;
  }

  .a {
    background: red;
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
  }

  .b {
    background: green;
    width: 40px;
    height: 40px;
    position: absolute;
    right: -40px;
  }

</style>

<div class="a">
  <div class="b"></div>
</div>

Activity

  1. added a commit that references this issue on Jan 23, 2016
    d81d1df
  2. added a commit that references this issue on Jan 23, 2016
    3061d50
  3. added a commit that references this issue on Jan 25, 2016
    9c7b9fa
  4. added a commit that references this issue on Jan 25, 2016
    4755cc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions