Bootstrap libs declaration

Asked

Viewed 430 times

3

I have declared bootstrap libs in the code so:

inserir a descrição da imagem aqui

My error is on the page, that when you click on the menu icon, it does not expand Behold:

inserir a descrição da imagem aqui

Any suggestions?

<!DOCTYPE html>
<html>
<head>
<title>Pousada Deutsches Haus</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="resources/css/estilo.css">
<link rel="stylesheet" type="text/css"   href="resources/bootstrap/css/bootstrap.css">
<script type="text/javascript" scr="resources/js/jquery-3.1.0.min.js"> </script>
<script type="text/javascript" scr="resources/bootstrap/js/bootstrap.js"></script>
<body>
<div class="container">
    <div class="col-xs-8">
        <img src="resources/imagens/logo_deut.png"> 
    </div>
        <nav class="navbar navbar-inverse navbar-fixed-top col-xs-4">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">Brand</a>
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="navbar-inverse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#">Home</a></li>
                    <li><a href="#about">About</a></li>
                    <li><a href="#contact">Contact</a></li>
                </ul>
                <div class="navbar-header navbar-right">
                    <p class="navbar-text">
                    <a href="#" class="navbar-link">Username</a>
                    </p>
                </div>
            </div>
        </nav>
    </div>
   </body>
   </html>
  • Exchange navbar-Collapse for navbar-inverse in data-target

  • Didn’t solve tbm, some other suggestion?

  • 1

    Instead of putting an image with HTML you could edit and put your HTML in text here so that we can quickly edit and discover the problem?

  • Nothing yet, it seems to be between the bootstrap js and jquery declaration

  • Follow code code in text there in question

  • 2

    trade "scr" for src

Show 1 more comment

1 answer

4


In the Javascript call you put scr= and the right thing is src=.

Would look like this:

<script type="text/javascript" src="resources/js/jquery-3.1.0.min.js"> </script>
<script type="text/javascript" src="resources/bootstrap/js/bootstrap.js"></script>
  • Bingoo! Thanks a lot. Taking advantage, I cannot implement this example Collapse menu on desktop http://answall.com/q/151555/45854 See if you can get it working on your environment

  • as tip puts your style <link rel="stylesheet" type="text/css" href="Resources/css/style.css"> below the bootstrap style, if it overlaps some style

  • Thanks beast, solved my problems here, hug!

  • Alisson, if the above answer solved your problem don’t forget to accept it to reward the author.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.