Hide Elements That Stretch Your Website | A Girl and Her Mac

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. I'll be pulling them from my fb page and adding them here on my blog monthly 😊




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 design’s sake then this fix is more of a bandaid and you should find the root cause of the problem.

{;} css code
#main-content {
overflow: hidden; 

Thanks for stopping by! 😃👋

More Divi Resources

Get updated on new Divi layouts and tutorials!

Like my freebies? Any tips you’d like to leave are greatly appreciated 😍

Coffee & Snack

Donate $5

Doggie Treats

Donate $10

Dinner & Dessert

Donate $25

— you may change the amount to anything you’d like —

Pin It on Pinterest