html - Bootstrap navbar not collapsing on iPhone -


i creating site using bootstrap, working fine when go view site on iphone navbar doesn't collapse. when viewing on windows phone works perfectly.

here code header, can see why happening?

<!doctype html> <html <?php language_attributes(); ?>>  <head>     <title><?php wp_title( ' | ',  true, 'right' ); ?></title>     <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" />     <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>     <link href='http://fonts.googleapis.com/css?family=lato' rel='stylesheet' type='text/css'>     <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /> <?php wp_head(); ?> </head>  <body <?php body_class(); ?>>     <!-- top logo , search bar -->     <div class="row header navbar">         <div class="container">             <div class="col-md-3 logo-header hidden-xs hidden-sm">                 <a href="<?php echo home_url(); ?>/">                     <img src="<?php echo  bloginfo('template_directory');?>/img/logo.jpg" alt="map consulting logo" class="img-responsive">                 </a>             </div>              <div class="col-md-3 logo-header hidden-lg hidden-md">                 <a href="<?php echo home_url(); ?>/">                     <img src="<?php echo  bloginfo('template_directory');?>/img/logo.jpg" alt="map consulting logo" class="img-responsive img-center">                 </a>             </div>              <div class="clear"></div>              <div class="col-md-3 pull-right hidden-xs hidden-sm">                  <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">                     <div class="input-group add-on">                         <input type="text" class="form-control" placeholder="search" name="s">                         <div class="input-group-btn">                             <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>                         </div>                     </div>                 </form>             </div> <!-- end of col md 3 -->             <!-- navigation phone , tablet - hidden on large screens -->             <div class="row hidden-lg hidden-md" id="mobilesearch" style="margin-bottom:10px;">                 <div class="col-xs-12">                      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">                         <span class="sr-only">toggle navigation</span>                         <span class="icon-bar"></span>                         <span class="icon-bar"></span>                         <span class="icon-bar"></span>                     </button>                     <div class="col-xs-12">                         <?php wp_nav_menu( array( 'theme_location'    => 'main-menu',                                            'depth'            => 1,                                             'container_class' => 'collapse navbar-collapse',                                             'menu_class'      => 'nav navbar-nav') ); ?>                      </div>                 </div>             </div>             <!-- navbar large screens, hidden when on phone or tablet -->             <div class="col-md-4 hidden-xs hidden-sm site-title pull-right">                 <div class="navbar-header">                     <?php wp_nav_menu( array( 'theme_location'    => 'main-menu',                                        'depth'            => 1,                                         'container_class' => 'nav-large',                                         'menu_class'      => 'nav navbar-nav') ); ?>                 </div> <!-- navbar collapse -->             </div> <!-- navbar header -->         </div> <!-- col md 4 -->     </div> <!-- end of container --> 

fixed issue adding

<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /> 

to header


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -