navbar width issue when in header and has >= 3 buttons

navbar width issue when in header and has >= 3 buttons

There's an issue in the JQM css that causes the navbar to exceed the width of the rest of the page on mobile devices when the navbar is in the header and contains 3 or more buttons. This results in a thin white line to the right of the page when viewed on a mobile device.

I fixed it by canging ".ui-navbar ul" overflow from visible to hidden (line 1920 of jquery.mobile-1.3.0-beta.1.css). It would, I think, be a good idea for this change to be made in the next release.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>navbar test</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
  7. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.css" />
  8. </head>
  9. <body>
  10.   <div data-role="page" class='type-home' id="index">
  11. <div data-role="header" data-id="header"> <!-- data-position="fixed" data-tap-toggle="false"> -->
  12.    <h2>navbar test</h2>
  13. <div data-role="navbar">
  14. <ul>
  15. <li><a href="#" data-icon="home">Tab1</a></li>
  16. <li><a href="#" data-icon="info">Tab2</a></li>
  17. <li><a href="#" data-icon="info">Tab3</a></li>
  18. </ul>
  19. </div>
  20. </div>
  21. <div data-role="content" data-theme="a" id="index_content">
  22. <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
  23. </div>
  24. <div data-role="footer">
  25. <h4>Footer</h4>
  26. </div>
  27. </div>

  28. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  29. <script type="text/javascript" src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.js"></script>
  30. </body>
  31. </html>