Title: Mega Menu Implementation in custom Theme and custom css
Last modified: August 22, 2016

---

# Mega Menu Implementation in custom Theme and custom css

 *  [W2014](https://wordpress.org/support/users/w2014/)
 * (@w2014)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/mega-menu-implementation-in-custom-theme-and-custom-css/)
 * Hallo, is there a special way to implement the menu in the theme?
 * …because i tried
 *     ```
       <div id="menu1">
         <?php wp_nav_menu(); ?>
       </div>
       ```
   
 * and it does not work
 * only this implementations shows the mega menu:
 *     ```
       <div id="menu1">
       wp_nav_menu( array('menu_class' => 'nav-menu','theme_location' => 'primary',) );?>
       </div>
       ```
   
 * i also tried to add some custom css like:
 *     ```
       li.mega-current-menu-item {
               background: rgba(255, 18, 178, 1);
               border-radius: 8px;
               }
       ```
   
 * , but css is simply ignored.
 * thx, alex
 * [https://wordpress.org/plugins/megamenu/](https://wordpress.org/plugins/megamenu/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [megamenu](https://wordpress.org/support/users/megamenu/)
 * (@megamenu)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/mega-menu-implementation-in-custom-theme-and-custom-css/#post-5775630)
 * Hi Alex,
 * ‘theme_location’ is required when calling wp_nav_menu, so thats why the first
   one doesn’t work.
 * The CSS output by Max Mega Menu is more specific than the CSS you’ve written 
   there, eg, max mega menu will output this:
 *     ```
       #mega-menu-primary-1 li {
            border-radius: 0;
       }
       ```
   
 * .. the selector is more specific (it includes an ID) so your CSS will be overridden.
 * You can make your CSS work by either making your selector more specific, or by
   adding !important’s, eg
 *     ```
       li.mega-current-menu-item {
               background: rgba(255, 18, 178, 1) !imporant;
               border-radius: 8px !important;
       }
       ```
   
 * Regards,
    Tom

Viewing 1 replies (of 1 total)

The topic ‘Mega Menu Implementation in custom Theme and custom css’ is closed to
new replies.

 * ![](https://ps.w.org/megamenu/assets/icon-128x128.png?rev=1489843)
 * [Max Mega Menu](https://wordpress.org/plugins/megamenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/megamenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/megamenu/)
 * [Active Topics](https://wordpress.org/support/plugin/megamenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/megamenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/megamenu/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [megamenu](https://wordpress.org/support/users/megamenu/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/mega-menu-implementation-in-custom-theme-and-custom-css/#post-5775630)
 * Status: not resolved