Hello Universe
Hello Universe

Reputation: 3302

Overflow-x not working in tablet and mobile devices

I have this website swagatobhatta.info

In iPhone, one can see overflow-x happening.. I gave overflow-x hidden. That did not solve the issue.

I even tried the following

  overflow-x: hidden !important;
  overflow-y: scroll;
  width:100%;
  max-width: 100%;
  position:relative;

It didn't fix. Any help please? Not sure what is causing this

Upvotes: 1

Views: 1066

Answers (2)

Kingpin
Kingpin

Reputation: 1

The overflow-x: hidden; doesn't work on mobile devices when you have <meta name='viewport'> tag on your HTML page.

Try removing the viewport and your code will work fine.

Upvotes: 0

davidxd33
davidxd33

Reputation: 1206

Requested as answer by OP:

There's something on the page that has a fixed width causing the overflow. Use browser emulators to inspect your code on mobile platforms to prevent confusion and headaches in the future.

Upvotes: 1

Related Questions