Divi – Mobile menu – X – on open

Divi – Mobile menu – X – on open

This is probably the simplest tutorial/snippet I’ve published on this website.

It’s also one of the most obvious, and I’m surprised I haven’t noticed this before, but yeah, look:

The default Divi mobile menu hamburger stays hamburger even when the menu is opened.

This snippet changes it to an X.

The code

#main-header .mobile_nav.opened .mobile_menu_bar:before {
    content: "\4d";


[sc name=”customcss”]


So simple.



For more simple stuff with the hamburger,

Change the size (note: it’s normally 32px, so this example is a bit large, change it to what you want)

#main-header .mobile_menu_bar:before {
    font-size: 45px; 


Change the color:

#main-header .mobile_menu_bar:before {
    color: red; 


Here’s how to change the normal hamburger altogether

Also you might want to check out
more header resources


[sc name=”podcast”]


[sc name=”learn css”]



Photo by David Paschke on Unsplash

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Asad Badat says:

    Super simple but much needed. Thank you!

    • PK says:

      Thank you for the kind words. Happy to help.

New tutorials

Breakdance 2 vs. Divi 4
Breakdance 2 for Agencies
First Look at Breakdance v2.0
ACF flexible fields (sort of) with Breakdance

Why no ads?

Hi, I'm PK, and I maintain and publish content on this site for two reasons.

  1. To give back to the community. I learned so much from people's tutorials and StackOverflow that I wanted to contribute and help others.

  2. To provide a more structured learning experience. People struggle to find the course that guides them from start to finish, based off of real life experience, and my courses provide that.

The only "ads" I have here are for my own courses, and maybe an affiliate link, but that's it. They fund the website resources and provide more motivation for me to produce better content.

Any bit of interest helps. Even sharing with your friends, suggesting my courses to your developer or designer, or subscribing to my YT channel, or joining our Discord. Thanks and I'll see you around!

There's a newsletter!

Sign up to the newsletter for the occasional updates on courses, products, tutorials, and sales.