Partage
  • Partager sur Facebook
  • Partager sur Twitter

Appeler Bootstrap et Jquery

Sujet résolu
    13 avril 2019 à 16:32:50

    Hello tous ! 

    Attention je débute ! :)

    Je n'arrive pas à "appeler" Bootstrap ni Jquery sur ma page "index.html". 

    Pourtant, j'ai l'impression d'avoir fait comme indiqué dans les cours... Qqn pourrait-il m'aider svp ? 

    Voici mon squelette de code :

    <!DOCTYPE html>

    <html>

    <head>

    <title>Mon_site</title>

    <meta charset="utf-8">

    <link rel="stylesheet" type="text/css" href="index.css">

    <link rel="stylesheet" type="bootstrap" href="css/bootstrap.css">

    </head>

    <body>

    <header>

    <div class="row">

    <div class="col-lg-4 col-md-4 col-sm-2 col-xs-2">Logo</div>

    <div class="col-lg-8 col-md-8 col-sm-10 col-xs-10">BLABLA</div>

    </div>

    </header>

    <script src="js/bootstrap.js"></script>

    <script src="js/jquery.min.js"></script>

    </body>

    </html>

    Précision : dans le dossier "Site internet", 4 fichiers/dossiers : index.html, index.css, css et js.

    Dans le dossier js: bootstrap.js et jquery.min.js

    Dans le dossier css: bootstrap.css

    J'espère m'être bien exprimée ! 

    Merci :)

    • Partager sur Facebook
    • Partager sur Twitter
      13 avril 2019 à 18:05:31

      Bonjour,

      Chez moi ça marche. Du moins, l'appel au fichier index.css

      En fait :

      <link rel="stylesheet" type="bootstrap" href="css/bootstrap.css">

      Le type="text/css" et non "bootstrap".


      -
      Edité par Natoub 13 avril 2019 à 18:19:19

      • Partager sur Facebook
      • Partager sur Twitter
        13 avril 2019 à 19:45:49

        Bonjour,

        Dans vos exemples vos liens ne fonctionneront que si votre fichier .html se trouve au même niveau que le dossier css, sous entendu bootstrap doit se trouver sur le pc.

        sinon il est possible aussi d'aller récupérer bootstrap via les cdn

        <!doctype html>
        <html lang="en">
          <head>
            <!-- Required meta tags -->
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        
            <!-- Bootstrap CSS -->
            <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
        
            <title>Hello, world!</title>
          </head>
          <body>
            <h1>Hello, world!</h1>
        
            <!-- Optional JavaScript -->
            <!-- jQuery first, then Popper.js, then Bootstrap JS -->
            <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
            <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
            <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
          </body>
        </html>



        • Partager sur Facebook
        • Partager sur Twitter

        Compos sui.

        Appeler Bootstrap et Jquery

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown