John John - 1 year ago 88
Android Question

Navbar collapse work on browser, not on smartphone

When I resize my browser window and make it smaller, the navbar nicely creates a collapse menu with a button on the right top corner. When I view the same site on my android phone, the navbar menu is always collapsed and the top right corner button is not visible. How can this be solved? Thanks!

<!DOCTYPE html>
<title>My Groundhops</title>
<!--[if lt IE 9]>
<script src="" type="text/javascript"></script>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">

<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<a class="brand" href="#">My Groundhops</a>

<div class="nav-collapse">
<ul class="nav">


<div class="container">
<div class="row">
<div class="span12">Content</div>

Answer Source

it seems to be a twitter bootstrap issue on opera mobile, it works on the default android browser. So my code seems OK.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download