Follow us

Remove Horizontal Scrollbars in Divi - Tutorial for Divi | Divi Soup

Like our free content? Then you'll love our exclusive Club!

Divi Academy Membership gives you exclusive access to over 110 resources, including child themes, layouts, cheatsheets, tutorials, live training and member perks. And new content is added EVERY Monday!

If you are adding custom styling to Divi, sometimes you may notice that you get a horizontal scrollbar across the bottom of your browser window, or on mobile devices you are able to move the content left and right on the screen. 

We don’t want this, it doesn’t look good!

It’s usually caused by an element being wider than its container so it hangs off the edge of the page, so ideally you want to find the element that is causing this horizontal scroll and fix it.  

But sometimes with more advanced styling, we actually want an element to hang off the edge of the page to create a specific effect. An example is my Passion Child Theme which is a resource included in my Divi Academy Membership.

In the image below you can see some green triangles, these are not part of the image, they are added using CSS and the effect runs throughout the child theme.

 

So how do we avoid the horizontal scroll but keep our custom effects? A little CSS of course smile

Add the following to your child theme stylesheet or Divi theme options custom CSS box and watch your horizontal scrollbar disappear!

#page-container {
    overflow-x: hidden;
}

 

 

And that’s it, pretty simple eh? 

If you found this helpful please leave a comment and subscribe to my newsletter for all my latest Divi related content. smile

Michelle X

Michelle Nunan is a multi-award winning marketer & trainer and full time Divi educator as well as a mother of two beautiful girls and two cheeky Black Labradors called Harley & Chaz. Michelle has been building websites since the late nineties, back in the days of GeoCities and Napster, before the web was the wonderful place it is now.

Related Posts

Enter your details below to get notified of the launch and early bird pricing

You have successfully joined the waitlist!

Pin It on Pinterest

Sharing is caring

Share this post with your friends!