user3181365 user3181365 - 1 year ago 53
Javascript Question

Basic Bootstrap not working

I am trying to learn Bootstrap following this Orielly Bootstrap book.

This is the simple html code:

<!DOCTYPE html>
<title>Bootstrap 101 Template</title>
<link href="css/bootstrap.css" rel="stylesheet">
<h1>Hello, world!</h1>
<script src="js/bootstrap.min.js"></script>
<div class="row">
<div class="span8">Span 8</div>
<div class="span4">Span 4</div>

I have downloaded Bootstrap and I have
at correct places. As per the code, we should get a row with 2 columns. But I am getting output as :

enter image description here

Please let me know what is the correct way of doing this?

Answer Source

It looks like the book you are reading is out of date. That is the syntax used in Bootstrap 2 (which is no longer supported).

Presumably you have downloaded the CSS for Bootstrap 3 or 4. Consult their documentation for the current syntax, which has changed significantly since Bootstrap 2.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download