How to Change the Mobile Menu’s Top Border Color in Divi

by | Jan 11, 2021 | Divi Tutorial

Divi is a popular WordPress theme (and theme builder) that comes with a host of features and allows for great customization options. In today’s Divi tutorial, we cover how to change the mobile menu’s top border color on a WordPress website using the Divi theme.

Most design changes you may want to make like changing font colors, padding, or background color styles can be done via Divi’s native front-end builder.

There are instances where specific changes require CSS to complete the task. Changing the mobile menu’s top border color is one such example when we need to use CSS to make the desired change. If you are unsure on how to add CSS to your Divi website, check out our other Divi tutorial post: How to Add Custom CSS to Your Divi Website.

Change the Mobile Menu’s Border Color

When you open the mobile menu on a new Divi installation, you will see a light blue horizontal line across the top of the menu.

Divi adds this top border by default and sets the style as seen. Since this default color will likely not match your website’s brand or theme, it’s important to be able to change the color of the top border line. To make this change, use the following CSS snippet.

/* Change the mobile menu border-top color and style */
.et_mobile_menu {
  /* Style the width, line style, and color of the top border */
  border-top: 3px solid green;
}

Additional Mobile Menu Border Styling

Using the CSS snippet listed above actually gives you control of three important properties. Feel free to make adjustments to any of the properties to achieve the style that best suits your needs.

  1. The width of the line: The first property in the border-top CSS controls the line width. You can change the width of the line to any value you want. The above snippet sets the border-top line to 3 pixels wide.
  2. The line style: The second property in the border-top CSS controls the line style. You can change the line style to solid, dotted, dashed, or more. The above snippet sets the border-top line style to solid.
  3. The line color: The third property in the border-top CSS controls the line color. You can set the line color using values like ‘green’ or ‘blue’ or even using a specific hexadecimal value like #FFB6E6. The above snippet sets the border-top color to green.

Below is another CSS snippet showing changes to all border-top CSS properties.

/* Change the mobile menu border-top color and style */
.et_mobile_menu {
  /* Style the width, line style, and color of the top border */
  border-top: 5px dashed #FFB6E6;
}

Remove the Mobile Menu’s Top Border

If you don’t like the border-top line at all, you can remove it completely with the CSS snippet:

/* Change the mobile menu border-top color and style */
.et_mobile_menu {
  /* Style the width, line style, and color of the top border */
  border-top: none;
}

Final Tips, Tricks, and Resources

Divi Theme

Divi is one of the best WordPress themes and one of the most powerful front-end website builders on the market. Divi is easy to use for beginners and allows endless design expression for professionals. Divi simplifies the hassles website development to make more time for website design. If you are interested in purchasing Divi, click the link below.

Need additional help?

If you have any questions about the content in this post, please feel free to reach out! We’d love to hear from you.

If you need a new website, a website redesign, or consultation related to any website question, please contact us today! We can schedule a consultation with you to get on track and work towards a solution to your problem. Redsence is ready to help you redefine your online presence today.

Disclosure: Some of the links on our Redsence Blog Posts to any recommended products are “affiliate links.” This means if you click on the link and purchase the item, we do receive a small reward for referring you to the product. It is no extra cost to you.

Related Posts