user3685376
user3685376

Reputation: 43

bootstrap styles are not applying after I included them in a simple HTML page

My html isn't linking to the bootstrap CSS. I downloaded bootstrap and copied the CSS, FONTS, and JS folders to a project folder. I created and index.html file in the same folder containing the CSS, FONTS, and JS. Here is the html.

    <html>
        <head>
            <link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
                    <link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css"/>
                    <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
                    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
                    <script src="js/bootstrap.js" type="text/javascript"></script>
                   <script src="js/bootstrap.min.js" type="text/javascript"></script>
        </head>
    <body>
        <div class="col-lg-5 success" >login form</div>
     <form action="logins.php" method="post" >
         user name : <input type="text" name="uname" required >
    password:<input type="password" name="pass" required >
    <input type="submit" value="login">
    </form>
        <a href="regist.php">please register</a>
    </body>
    </html> 

Upvotes: 2

Views: 16921

Answers (1)

hometoast
hometoast

Reputation: 11782

Only include bootstrap.js or bootstrap.min.js, but not both. Same goes for the .css file. Either the .css or the .min.css file, not both.

bootstrap.js requires jquery. Don't forget that as well.

<head>
   <link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css"/>
   <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
   <script src="https://code.jquery.com/jquery.js"></script>
   <script src="js/bootstrap.js" type="text/javascript"></script>
</head>

Upvotes: 2

Related Questions