tg marcus
tg marcus

Reputation: 167

Why dont my cdn file work in the browser?

The HTML code given below does not follow the stylesheet that is provided in the link. I have entered several cdn links but none seem to render to the app.

<!DOCTYPE html>
<html>
    <head>
        <title>Refugee Stories</title>
        <link rel = "stylesheet" href = "index.css">
        <meta name = "viewport" content="width = device-width,initial-scale=1.0">
        <meta charset="utf-8">
    <!-- jQuery Version 1.11.0 -->
    <script
    src="https://code.jquery.com/jquery-3.5.1.js"
    integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
    crossorigin="anonymous"></script>
   <!-- Bootstrap Core JavaScript -->
   <script src="https://raw.githubusercontent.com/IronSummitMedia/startbootstrap/gh-pages/templates/agency/js/bootstrap.min.js"></script>
   <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>

    </head>
...
</html>

Upvotes: 1

Views: 1395

Answers (1)

Dannick Bedard
Dannick Bedard

Reputation: 402

To many jquery and not the right cdn for boostrap...

I have test it... and it seem like your boostrap code is not working... i replace then in my exemple, and make sure that your css file as the right path too :

<!DOCTYPE html>
<html>

<head>
    <title>Refugee Stories</title>
    <meta name="viewport" content="width = device-width,initial-scale=1.0">
    <meta charset="utf-8">
    <!-- Style sheet (make sure yout path is valide)-->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
        integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <link rel="stylesheet" href="index.css">
    <!-- Script -->

    <!-- JS, Popper.js, and jQuery -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous">
    </script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
    </script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
        integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous">
    </script>

</head>

<body>
    <!-- Your html -->
</body>

</html>

Hope it can help you continue your project :)

Upvotes: 2

Related Questions