1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Drop down menu from main menu bar

Discussion in 'Free Divi Community Forum' started by Ben Grodski, Nov 29, 2021.

  1. Ben Grodski

    Ben Grodski New Member

    Hello. Thank you in advance as this forum has always been helpful.

    I recently made some changes to my primary menu bar by adding some CSS code to give it a background and change the padding between menu item. In the Divi/ Theme Customizer /header navigation/ primary menu bar setting I changed the color and size of my menu items. This seemed to change the color (to black) of the drop down menu items WHEN you scroll a bit down from anyone of my pages. If you do not scroll on a page the dropdown menu color is the original white color. How do i fix this. This is my CSS code that I am using for the primary menu:

    header.et-l.et-l--header {
    z-index: 99999;
    position: relative;
    }
    #top-menu .sub-menu {
    background-color: rgb(55,116,154); /* Background color dropdown */
    border-top:0px solid #f2f6fa; /* Top border color dropdown */
    }
    #top-menu .sub-menu li a {
    font-size: 12px; /* Font size dropdown */
    width: 100%;
    color: #fff;
    border-bottom: 2px solid #789276; /* Border bottom menu item color */
    }
    .sub-menu li:hover {
    background-color: #25313a; /* Hover color menu item */
    }
    .sub-menu .current_page_item {
    background-color: #9dcef3; /* Current menu item color dropdown */
    }
    #top-menu .sub-menu li {
    padding-left: 0px;
    padding-right: 0px;
    width: 100%;
    }
    #top-menu .sub-menu {
    padding-top: 0px;
    padding-bottom: 0px;
    }
    #top-menu li li a {
    padding-top: 0px;
    padding-bottom: 0px;
    }
    .footer-top-visible .footer-nav-widgets-wrapper, .footer-top-hidden #site-footer { margin-top: 0 !important; }
    .post-inner, .cover-header + .post-inner { padding-top: 0 !important }
    /* Main Navigation Image*/
    #main-header{
    background:url(http://mrgrodskichemistry.com/wp-content/uploads/2021/11/Periodic-Main-menu-header-2.jpg)
    no-repeat center;
    background-size: cover;
    }
    @Media (min-width: 1200px) {
    #top-menu li {
    padding-right: 35px;
    }}


    Thank you for your time.
    Ben
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade horizontal timeline design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    Log In or Sign Up to view this code.
     
  3. Ben Grodski

    Ben Grodski New Member

    Thank you! That did it!
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Agency Divi layout pack featuring unique comment design on single blog post page:View Demo