1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, 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

Closing menu with an outside click

Discussion in 'Free Divi Community Forum' started by Artemartzhura, Feb 18, 2022.

  1. Artemartzhura

    Artemartzhura New Member

    Hey guys,

    I need some help with header menu dropdown bar. I want it to be closable, clicking everywhere (not only menu sign)
    Here is the code I have rn:

    /*********************************
    style mobile fixed header
    *********************************/

    .et_fixed_nav #main-header.et-fixed-header {
    position: fixed;
    background: rgba(0,173,239,0.8);
    height: 55px;
    }

    .et-fixed-header .logo_container {
    height: 55px;
    }

    .et-fixed-header .mobile_menu_bar {
    padding-bottom: 5px;
    }

    /*********************************
    make mobile fixed header navigation icon larger
    *********************************/

    .et-fixed-header .mobile_menu_bar:before {
    font-size: 45px;
    color: black;
    }

    .et_header_style_left .et-fixed-header #et-top-navigation {
    padding-top: 5px;
    }

    .et_fixed_nav #et-top-navigation {
    -webkit-transition: none;
    -moz-transition: none;
    transition: none;
    }

    /**************************
    Increase height of logo area on mobile and mobile fixed header
    ***************************/
    #logo, .et-fixed-header #logo {
    max-height: 80%;
    }

    }
     
    1. PRO MEMBER PERKS Divi Powerful Child Theme - Power up your Divi sites with tons of new functionalities & premade elements:Learn More
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try the below code in WP Admin > Divi > Theme Options > Integration > Body Code:
    Code:
    Log In or Sign Up to view this code.