Bootstrap
Making your website look great, quickly
What’s Bootstrap?
Why is Bootstrap Awesome?
How Do I Get Bootstrap?
From a Content Delivery Network (CDN):
It’s simply a URL you can link to that stores the Bootstrap files.
<!DOCTYPE html>
<head>
<!-- First, link to the Bootstrap CSS CDN -->
<link href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css” rel=”stylesheet”>
<!-- Then, link to your own CSS file if you want to override Bootstrap styling -->
<link href=”/static/css/styles.css” rel=”stylesheet”>
</head>
<body>
<!-- Your webpage code goes here -->
<!-- If you’re using the Bootstrap JavaScript CDN, link to it here. It requires jQuery! -->
<script src=”http://code.jquery.com/jquery.js”></script>
<script src=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js”></script>
</body>
</html>
Bootstrap’s 12-Column Grid System
Documentation
The documentation is thorough!
So many cool components!
Containers
Containers
Containers
<body>� <div class="container-fluid"> Navbar code goes here. </div>� <div class="container">� <!-- webpage code goes here -->� </div> <!-- End .container -->�</body>
Containers
Rows
Rows
<body>
<div class=”container”>
<div class=”row”>
<!-- columns go here -->
</div>
<div class=”row”>
<!-- columns go here -->
</div>
</div>
</body>
Columns
Columns
Columns
<div class=”row”>
<div class=“col-xs-12 col-md-6 col-lg-3”> Some text. </div>
<div class=“col-xs-12 col-md-6 col-lg-9”> More text. </div>
</div>
Web Page Structure with Bootstrap
Navbar container
Body container
Row
Row
6-column section
6-column section
4-column section
4-column section
4-column section
Container/Row/Column Structure
<body>� <div class="container-fluid"> Navbar code goes here. </div>� <div class="container">� <div class="row">� <div class="col-xs-12"> Main content goes here. </div>� </div> <!-- End .row -->� </div> <!-- End .container -->�</body>
Offsets
Offset
Offset
<div class=“container”>
<div class=“row”>
<div class=“col-xs-offset-8 col-xs-4”>
<img src=“cupcakes.jpg” alt=“cupcakes”>
</div>
</div> <!-- end .row -->
</div> <!-- end .container -->
Other Tools
Planning a Front-End with Bootstrap
Remember to use Chrome’s Developer Tools for debugging!
More Bootstrap Resources