html - Twitter Bootstrap does not work when using IP Address but works in "localhost" -


i need , advice issue facing in learning twitter bootstrap. using exact code w3schools putting collapsible navbar.

i using eclipse , apache tomcat local server.

i seeing 2 different outputs same code.

for weird reasons, unable upload images.. :(

site when run on "localhost" (http://localhost:8080/test.html)

site when run on "ip address" (http://my-ip:8080/test.html)

<!doctype html> <html lang="en"> <head>     <title>bootstrap case</title>        <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1">     <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>     <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body>     <nav class="navbar navbar-inverse">         <div class="container-fluid">             <div class="navbar-header">                 <button type="button" class="navbar-toggle" data-toggle="collapse"                     data-target="#mynavbar">                     <span class="icon-bar"></span> <span class="icon-bar"></span> <span                         class="icon-bar"></span>                 </button>                 <a class="navbar-brand" href="#">websitename</a>             </div>             <div class="collapse navbar-collapse" id="mynavbar">                 <ul class="nav navbar-nav">                     <li class="active"><a href="#">home</a></li>                     <li class="dropdown"><a class="dropdown-toggle"                         data-toggle="dropdown" href="#">page 1 <span class="caret"></span></a>                         <ul class="dropdown-menu">                             <li><a href="#">page 1-1</a></li>                             <li><a href="#">page 1-2</a></li>                             <li><a href="#">page 1-3</a></li>                         </ul></li>                     <li><a href="#">page 2</a></li>                     <li><a href="#">page 3</a></li>                 </ul>                 <ul class="nav navbar-nav navbar-right">                     <li><a href="#"><span class="glyphicon glyphicon-user"></span>                             sign up</a></li>                     <li><a href="#"><span class="glyphicon glyphicon-log-in"></span>                             login</a></li>                 </ul>             </div>         </div>     </nav>      <div class="container">         <h3>collapsible navbar</h3>         <p>in example, navigation bar hidden on small screens             , replaced button in top right corner (try re-size             window).         <p>only when button clicked, navigation bar             displayed.</p>     </div>  </body> </html> 

the issue got solved x-ua compatibility.

can please confirm if right solution problem or temporary fix?

x-ua-compatible” content=“ie=9; ie=8; ie=7; ie=edge


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -