Responsive mobile horizontal scroll issue
Last updated
Was this helpful?
Last updated
Was this helpful?
Sometimes when you see your pages on the mobile, the page ends up with an undesired extra space to the right. (It slides from the left to the right). In this article, you will learn
Basically, the main reason for this issue happening is that the content of the page has a bigger width than the deviceโs width.
For example, the mobile device's width is 375px, but there is an element having more than 375px, so you have to scroll horizontally to see the full element.
In some cases, if you set the negative margin-left and right for an element, it can cause this issue.
You can check this video tutorial for more visualization:
Navigate to the bottom left corner, hover over it to see the feature Add custom Code popping up, and make a left-click.
Click on the Save change button and publish the page to see the result.
Check Element Widths: Ensure no element exceeds the deviceโs width to prevent horizontal scrolling.
Avoid Negative Margins: Negative margins can cause overflow; use them cautiously.
Use Custom CSS: Apply custom CSS to fix issues with horizontal scrolling on mobile devices
1. What causes horizontal scrolling?
Content wider than the deviceโs screen, often due to oversized elements or negative margins.
2. How can I fix the scrolling issue?
Use the provided custom CSS code to correct the overflow problem.
Step 1: Open the
And then, go to this to get the code and paste it into the Custom CSS box like the image below
Note: If the above code does not work, you can change it into this . Please notice this CSS when the page has a sticky section or sticky header on mobile. This code will disable sticky sections.