• Hi,
    I get an issue on mobile devices with my menu and part of my style.
    I use a child theme and media queries in my style.css.
    I get 2 top menus that I display one below theother on laptop and I would like to gather both with toggler button on mobile devices.
    So I have created a third menu ‘navigation mobile” in my admin.
    In my header.php I have:

    <nav id="site-navigation" class="navigation-main mobile" role="navigation">
    <h1 class="menu-toggle"><?php _e( 'Menu', 'expound' ); ?></h1>
    			<?php
    
    $defaults = array(
    	'theme_location'  => 'mobile',
    	'menu'            => 'Navigation mobile',
    	'container'       => 'div',
    	'container_class' => '',
    	'container_id'    => '',
    	'menu_class'      => 'menu',
    	'menu_id'         => '',
    	'echo'            => true,
    	'fallback_cb'     => 'wp_page_menu',
    	'before'          => '',
    	'after'           => '',
    	'link_before'     => '',
    	'link_after'      => '',
    	'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
    	'depth'           => 0,
    	'walker'          => ''
    );
    
    wp_nav_menu( $defaults );
    
    ?>
    
    			<?php do_action( 'expound_navigation_after' ); ?>
    		</nav><!-- #site-navigation -->

    I use add-on “window resize” on Chrome browser and it displays well when I resize the window (320px or 480px width) except that the toggler button does not appear at the width wanted but at 616px.
    I put at @media (max-width: 600px) `.mobile{
    display: block !important;
    }`
    And on mobile devices, I lost a menu and the toggler button does not appear.
    Plus, my sidebars don’t take the full width of the screen.

    But I repeat with the add-on “window resize”, it looks great.

    Please somebody can help me?
    Cheers.

  • The topic ‘Issue on mobile devices’ is closed to new replies.