Last Updated on July 3, 2019

Hide Elements That Stretch Your Website

Aug 19, 2017 | CSS Tutorial

This is from my #diviquicktip CSS snippet series in which I post different quick CSS fixes on my Facebook page whenever I come across some of the most common pesky Divi quirks.




Do you ever have elements in your design that “stretch” your website, making it so the user can scroll to the left or right when they shouldn’t be able to? Sometimes it’s only noticeable on mobile but it’s very annoying.


The code below goes in your child stylesheet or in Divi theme options > general > Custom CSS box. If you are not purposely placing elements slightly off-page for the sake of design then this fix is more of a band-aid and you should find the root cause of the problem.

{;} css code

#main-content {
overflow: hidden;