Hide Elements That Stretch Your Website

Aug 19, 2017 | CSS Tip | 0 comments

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.

Example:

Example

Problem:

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.

Fix:

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; 
}