php - menu_class wordpress navigation. problems defining multiple nested classes -


so new wordpress , have created menu in dashboard. here code have in header.php file....

<?php function register_my_menu() {       register_nav_menu('header-menu',__( 'header menu' )); } add_action( 'init', 'register_my_menu' ); ?>      <?php       function register_my_menus() {       register_nav_menus(         array(           'header-menu' => __( 'header menu' ),           'extra-menu' => __( 'extra menu' )         )       );     }     add_action( 'init', 'register_my_menus' );      ?>         <?php         wp_nav_menu( array(          'theme_location' => 'inner-header',         'menu_class' => 'menubar',        ) );       ?> 

the problem having when defining menu_class work if call single word classes. here css below. needing whole menu styled of styling menu.

ul.menubar {   background: white;   list-style: none;   padding: 0 10px;   height: 40px;   padding-bottom: 30px;   float: right; } /* line 157, ../scss/my-styles.scss */ ul.menubar > li {   display: inline-block;   position: relative; } /* line 161, ../scss/my-styles.scss */ ul.menubar > li > {   color: black;   display: block;   padding: 10px 14px;   text-decoration: none; } /* line 167, ../scss/my-styles.scss */ ul.menubar > li > a:hover {   background: #29a7f5;   color: white; } /* line 170, ../scss/my-styles.scss */ ul.menubar > li > ul {   display: none;   position: absolute;   top: 100%;   background: white;   padding: 10px 0; } /* line 177, ../scss/my-styles.scss */ ul.menubar > li > ul > li > {   color: black;   display: block;   padding: 8px 20px;   text-decoration: none; } /* line 183, ../scss/my-styles.scss */ ul.menubar > li > ul > li > a:hover {   background: #29a7f5;   color: white; } /* line 188, ../scss/my-styles.scss */ ul.menubar > li.is-selected > {   background: #29a7f5;   color: white; } /* line 189, ../scss/my-styles.scss */ ul.menubar > li.is-selected > ul {   display: block; } 

if define class in php ul.menubar not work. let alone trying define of other classes ul.menubar > li > a . . . etc etc

any appreciated!! kindly

i think may u... menu taken format in wordpress...

    <ul class="menubar">          <li id="menu-item-1" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22"><a title="" href="">menu1</a></li>      <li id="menu-item-2" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-21"><a title="" href="">menu2</a></li>      </ul> 

reference: http://codex.wordpress.org/function_reference/wp_nav_menu


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -