2

I'm applying the following CSS to successfully disable side-scrolling when viewing a site via desktop:

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

However, when viewing the site on a mobile browser, side scrolling is still possible.

To be clear, there is content that is overflowing the screen width. I'd like to keep it that way if possible, but make it so the user cannot scroll to see the overflowing content. As this is easy to do with the above code from a desktop browser, I suspect it must be possible on a mobile browser as well.

mbeachey
  • 59
  • 1
  • 5
  • Are there any elements with a `position: absolute` style? –  Dec 14 '19 at 06:23
  • 2
    Can you please put a demo in slackblitz or in the code snippet which contains html elements too so can recreate the issue – Akhi Akl Dec 14 '19 at 07:20
  • devision1088 —yes, several elements on the page have position: absolute. Would that be an issue? Akhi Akl —I'll share a code snippet soon. – mbeachey Dec 26 '19 at 21:39

0 Answers0