Tonight I decided to give Bootstrap a try (only been doing CSS/HTML for about two weeks), but I'm running into a problem. For whatever reason, it doesn't seem like my HTML doc is linking to the Bootstrap stylesheet. I used one of their dropdown code snippets, but the end result isn't stylized. Can someone see if I'm doing something wrong? Below is my HTML code.
<!DOCTYPE html>
<html lang = "en">
<head>
<title>Test</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a tabindex="-1" href="#">Action</a></li>
<li><a tabindex="-1" href="#">Another action</a></li>
<li><a tabindex="-1" href="#">Something else here</a></li>
<li class="divider"></li>
<li><a tabindex="-1" href="#">Separated link</a></li>
</ul>
</body>
</html>
It might have to do with the space inside "HTML Project" directory. However, testing a website through the file system is, at best, inconclusive, as CBroe pointed out. In most cases, if you make it work through file system it will stop working on a web server and chances are the latter is how you want it to work.
We can check Bootstrap-specific method is available or not. Syntax: var bootstrap = (typeof $(). "Bootstrap-specific method" == 'function');
CSS is more complex than Bootstrap because there is no pre-defined class and design. Bootstrap is easy to understand and it has much pre-design class. In CSS, we have to write code from scratch. In Bootstrap, we can add pre-defined class into the code without writing code.
Are all the files in the right folders? You are using relative url:s, can be confusing if you just started to code. How is your folder structure? Are the index.html and the css folder in the same directory?
You Need to look at the file structure of how bootstrap files are added:
http://twitter.github.com/bootstrap/getting-started.html#file-structure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With