Bootstrap Reference Guide Bootstrap 4 and 3 Cheat Sheets Collection Bootstrap 4 Quick Start
Bootstrap Reference Guide Bootstrap 4 and 3 Cheat Sheets Collection Bootstrap 4 Quick Start
Reference Guide
Published on January 1, 2019
Jacob Lett is the author of the Bootstrap 4 Quick Start, and the
Bootstrap Reference Guide. His books and training help web developers
save time learning how to design and build responsive websites.
www.linkedin.com/in/jacoblett/
Bootstrap Reference Guide
Jacob Lett
Copyright © 2019 by Jacob Lett
Publisher
Bootstrap Creative
Sterling Heights, Michigan 48314
(586) 894-8024
Find us on the web at: bootstrapcreative.com
Notice of Rights
All rights reserved. Please do not distribute, share, or sell without the written permission of the
publisher. You may print pages for personal use. If you would like to share this with a group,
please contact support@bootstrapcreative.com.
Notice of Liability
The information in this book is distributed on an "as is" basis without warranty. While every
precaution has been made in the preparation of the book, neither the author nor Bootstrap
Creative shall have any liability to any person or entity with respect to any loss or damage caused
or alleged to be caused directly or indirectly by the instructions contained in this book or by the
computer software products described in it.
Trademarks
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and Bootstrap Creative
was aware of a trademark claim, the designations appear as requested by the owner fo the
trademark. All other product names and services identified throughout this book are used in
editorial fashion only and for the benefit of such companies with no intention of infringement of
the trademark. No such use, or the use of any trade name, is intended to convey endorsement or
other affiliation with this book.
Bootstrap is released under the MIT license and is copyright 2018 Twitter.
ISBN: 978-1-7322058-3-3
Table of Contents
Bootstrap v4.2.1 1
Flexbox Reference 19
Colors Reference 33
Bootstrap v3.4.0 37
Resources 47
Notes 51
BootstrapCreative.com :1
Bootstrap 4.2.1
CSS
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/
bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj
70gZWKYbI706tWS" crossorigin="anonymous">
JS
JS is only necessary if you plan on using one or all of the following components: Alerts, Buttons,
Carousel, Collapse, Dropdowns, Modals, Navbar, Tooltips and Scrollspy
Components Utilities
Extra small devices (portrait phones, less than .text-left Left aligned text
576px) do not require a breakpoint because .text-*-left Left aligned by breakpoint
Bootstrap 4 is mobile first. .text-center Center aligned text
.text-right Right aligned text
Breakpoints | Max container width
.text-justify Justified text
not needed=Extra small < 576px | None
.text-nowrap No wrap text
(auto)
.text-(lowercause, uppercase, capitalize)
sm=Small ≥ 576px | 540px
Changes the text capitalization style
md=Medium ≥ 768px | 720px .text-decoration-none Removes decoration
lg=Large ≥ 992px | 960px .text-truncate Truncate text with ellipsis
xl=Extra large ≥ 1200px | 1140px .lead Good for first paragraph of article
.text-monospace Changes to monospace font
Media Queries
.font-weight-(bold, bolder, normal, light,
Change the width value to set a media query lighter, italic) Changes the font weight
for sm, md, lg, xl. .blockquote Slightly increases font-size
and sets a bottom margin for blockquotes
/* Small devices (landscape phones, 576px .(h1, h2, h3, h4, h5, h6) Used to make an
and up) */ element match the heading styles
@media (min-width: 576px) { } .display-(1, 2, 3, 4) Large display text.
1=96px, 2=88px, 3=72px, 4=56px
Lists
Colors
.list-unstyled Removes default list margin
.dl-horizontal Makes list items two .text-primary .bg-primary
columns .text-secondary .bg-secondary
.list-inline Makes list items inline .text-success .bg-success
.list-inline-item Added to each li
.text-danger .bg-danger
.text-warning .bg-warning
Example .text-info .bg-info
<ul class="social-icons list-inline">
.text-light .bg-light
<li class="list-inline-item">item 1</li>
.text-dark .bg-dark
</ul>
.text-body .bg-white
.text-muted .bg-transparent
.text-white
.text-black-50
.text-white-50
BootstrapCreative.com :3
Bootstrap 4
Images Display
.img-fluid Make an image responsive Value can equal one of the following:
.rounded Adds rounded corners to image none, inline, inline-block, block,
.rounded-circle Crops image to be circle table, table-cell, table-row, flex,
.img-thumbnail Adds rounded corner and img inline-flex
border
.d-(value) for xs
.d-(sm, md, lg, and xl)-(value) sets
Floats display value for breakpoint and up
Border Radius
.rounded Adds border radius on all edges Sizing
.rounded-* (top, right, bottom, left,
circle) Adds a border radius
Make an element as wide or as tall (relative to
.rounded-0 Removes border radius
its parent)
Vertical Align
.align-(baseline, top, middle, bottom,
text-top, text-bottom) Changes the
vertical alignment of inline, inline-
block, inline-table, and table cell
elements.
BootstrapCreative.com :5
Bootstrap 4
Starter Template
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/
css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4
iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<!-- Main CSS -->
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="container">
<h1>Hello, world!</h1>
<div class="row">
<div class="col-sm-6">Left Column</div>
<div class="col-sm-6">Right Column</div>
</div>
</div>
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<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.6/umd/popper.min.
js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"></script>
<!-- Main JS -->
<script src="js/main.js"></script>
</body>
</html>
Bootstrap 4
One Column Centered Grid Figures
<div class="container"> <figure class="figure">
<div class="row justify-content- <img src="https://dummyimage.
center"> com/100x100/563d7c/fff&text=+"
<div class="col-md-6"></div> class="figure-img img-fluid rounded"
alt="image">
</div>
<figcaption class="figure-caption">A
</div>
caption for the above image.</figcaption>
<div class="container">
Media Object
<div class="row">
<div class="col-sm-6"></div>
<div class="media">
<div class="col-sm-6"></div>
<img src="https://dummyimage.
</div> com/100x100/563d7c/fff&text=+"
</div> class="mr-3" alt="image">
<div class="media-body">
Three Column Grid <h5 class="mt-0">Media heading</h5>
Media object description text
<div class="container">
</div>
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4"></div> Code
<div class="col-sm-4"></div>
</div> <code>
</div> Used to display inline code in a paragraph
<pre class="pre-scrollable">
Four Column Grid
Display multiple lines of code. Use .pre-
scrollable class to set a max-height of
<div class="container">
340px and provide a y-axis scrollbar
<div class="row">
<var>
<div class="col-sm-3"></div>
Used to display math variables
<div class="col-sm-3"></div>
<kbd>
<div class="col-sm-3"></div>
<div class="col-sm-3"></div>
Used to display keyboard input
<samp>
</div>
</div> Used to display sample output
BootstrapCreative.com :7
Bootstrap 4
Navbar
<nav class="navbar navbar-toggleable-md navbar-dark bg-primary">
<button class="navbar-toggler navbar-toggler-right" type="button" data-
toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">Navbar</a>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="http://example.com"
id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-
expanded="false">
Dropdown link
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</ul>
</div>
</nav>
Bootstrap 4
Modal
BootstrapCreative.com :9
Bootstrap 4
Forms
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-
describedby="emailHelp" placeholder="Enter email">
<small id="emailHelp" class="form-text text-muted">We'll never share your email
with anyone else.</small>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1"
placeholder="Password">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
Buttons
.btn Needs to be added to all buttons because it adds padding and margin
.btn-* primary, secondary, success, danger, warning, info, light, dark, link
.btn-outline-* primary, secondary, success, danger, warning, info, light, dark, link
.btn-lg Large buttom
.btn-sm Smaller than default button
Example
<a class="btn btn-primary" href="#" role="button">Link</a>
<button class="btn btn-secondary" type="submit">Button</button>
Bootstrap 4
Carousel
<div id="carousel-name" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-name" data-slide-to="0" class="active"></li>
<li data-target="#carousel-name" data-slide-to="1"></li>
<li data-target="#carousel-name" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img class="d-block img-fluid" src="https://dummyimage.com/900x340/563d7c/
fff&text=+" alt="First slide">
<div class="carousel-caption d-none d-md-block">
<h3>Carousel Slider Title</h3>
<p>Description text to further describe the content of the slide image</p>
<a href="" class="btn btn-primary">Call to Action</a>
</div>
</div>
<div class="carousel-item">
<img class="d-block img-fluid" src="https://dummyimage.com/900x340/563d7c/
fff&text=+" alt="Third slide">
<div class="carousel-caption d-none d-md-block">
<a href="" class="btn btn-primary">Call to Action</a>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carousel-name" role="button" data-
slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carousel-name" role="button" data-
slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
BootstrapCreative.com : 11
Bootstrap 4
Jumbotron
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-3">Fluid jumbotron</h1>
<p class="lead">This is a modified jumbotron that occupies the entire horizontal
space of its parent.</p>
</div>
</div>
Card
<div class="card" style="width: 20rem;">
<img class="card-img-top w-100" src="https://dummyimage.com/600x400/563d7c/fff"
alt="Card image cap" >
<div class="card-body">
<h4 class="card-title">Card title</h4>
<p class="card-text">Some quick example text to build on the card title and make up
the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Breadcrumbs
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li class="active">Data</li>
</ol>
Responsive embed
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
Bootstrap 4
Tables
<table class="table">
<thead class="thead-dark">
<tr>
<th>#</th>
<th>thead-dark</th>
</tr>
</thead>
Want to Save Time
<tbody>
<tr>
Using Bootstrap 4?
<th scope="row">1</th>
Get project templates, tutorial videos,
printable reference guides and more!
<td>Nina</td>
</tr>
</tbody>
</table>
<table class="table">
<thead class="thead-light">
<tr>
<th>#</th>
<th>thead-light</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Nina</td>
</tr>
</tbody>
</table>
BootstrapCreative.com : 13
Bootstrap 4
Component CSS Format and Media Queries
/*
* Component section heading
*
* Component description and use
*/
.component-heading {
display: block;
width: 100px;
font-size: 1rem;
}
.alert .btn
BootstrapCreative.com : 15
Bootstrap 4
.carousel-control-(next, prev) .d-print-(block, inline, inline-block,
.carousel-control-(next, prev)-icon none, flex, inline-flex, table, table-
.carousel-fade cell, print-table-row)
.carousel-indicators .disabled
.carousel-inner .display-(1, 2, 3, 4)
.carousel-item .dropdown
.clearfix .dropdown-item
.close .dropdown-item-text
.col .dropdown-menu
.col-auto .dropdown-toggle
.col-form-label .dropdown-toggle-split
.collapse .dropright
.collapsing .dropup
.container .embed-responsive
BootstrapCreative.com : 17
Bootstrap 4
.nav-tabs .shadow-(none, sm, lg)
.navbar .show
.navbar-brand .small
.navbar-collapse .sr-only
.navbar-(dark, light) .sr-only-focusable
.navbar-expand-(sm, md, lg, xl) .tab-content
.navbar-nav .tab-pane
.navbar-text .table
.navbar-toggler .table-active
.navbar-toggler-icon .table-bordered
.no-gutters .table-borderless
.offset-(sm, md, lg, xl)-(1-12) .table-hover
.order-(sm, md, lg, xl)-first .table-(primary, secondary, success,
.order-(sm, md, lg, xl)-last danger, warning, info, light, dark)
BootstrapCreative.com : 19
Bootstrap 4
Multiples of 15 Multiples of 30
15 405 30 810
30 420 60 840
45 435 90 870
60 450 120 900
75 465 150 930
90 480 180 960
105 495 210 990
120 510 240 1020
135 525 270 1050
150 540 300 1080
165 555 330 1110
180 570 360 1140
195 585 390 1170
210 600 420 1200
225 615 450 1230
240 630 480 1260
255 645 510 1290
270 660 540 1320
285 675 570 1350
300 690 600 1380
315 705 630 1410
330 720 660 1440
345 735 690 1470
360 750 720 1500
375 765 750 1530
390 780 780 1560
BootstrapCreative.com : 21
Flexbox Reference
BootstrapCreative.com : 22
Flexbox Reference
Flexbox Reference
Below is flexbox example markup. You could apply flexbox CSS properties manually, but things
can get cumbersome when you are trying to apply responsive functionality. The benefit of using
Bootstrap 4 flexbox utility classes is that you can set flexbox properties and target specific
breakpoints.
<div class="flex-container">
<div class="flex-item-a">flex item with a class .flex-item-a</div>
<div>flex item</div>
<div>flex item</div>
</div>
The following pages compares vanilla CSS flexbox to Bootstrap 4 flexbox utility classes to help
you decide which approach is best for your situation.
BootstrapCreative.com : 23
Flexbox Reference
Flex Container
Flex layout gives the container the ability to alter its items' width/height (and order) to best fill the
available space of the container.
The container has a main axis and cross axis which depends on the flex direction. Each axis has
a start and end. For example, if you set the flex direction to column. The main axis is vertical and
the cross axis is horizontal. If you set the flex direction to row, the main axis is horizontal and the
cross axis is vertical.
Main
2
Cross
3
M-Start M-End / C-End
Main 3
2
Cross
M-End / C-End M-Start
1
Cross
M-Start
Flexbox Reference
FLEXBOX CONTAINER
CSS Bootstrap 4
inline-flex .d-flex
BootstrapCreative.com : 25
Flexbox Reference
FLEXBOX CONTAINER
CSS Bootstrap 4
row-reverse .flex-row
Main
2
Cross
3
M-Start M-End / C-End
Main 3
2
Cross
M-End / C-End M-Start
1
Cross
M-Start
Flexbox Reference
FLEXBOX CONTAINER
CSS Bootstrap 4
space-around
start and end items are not to the edge but
have 1 unit of space on each side
space-evenly
similar to space-around, except all space is
the same
BootstrapCreative.com : 27
Flexbox Reference
FLEXBOX CONTAINER
CSS Bootstrap 4
space-around
lines are evenly distributed with equal space
around each line
stretch (default)
lines stretch to take up the space that is left
Flexbox Reference
FLEXBOX CONTAINER
CSS Bootstrap 4
stretch (default)
stretch to fill the container
BootstrapCreative.com : 29
Flexbox Reference
FLEXBOX CONTAINER
Step 6: Do you want the items to wrap if they don't fit on one
line?
CSS Bootstrap 4
wrap .flex-nowrap
Shorthand property
This is a shorthand property that sets the flex-direction and flex-wrap properties. I
suggest avoid using this until you learn the core properties because it could make things more
confusing.
CSS Bootstrap 4
Example:
HTML
<div class="flex-container">
<div class="flex-item-a">.flex-item-a</div>
<div class="flex-item-b">.flex-item-b</div>
<div class="flex-item-c">.flex-item-c</div>
</div>
CSS
.flex-item-a {
order: 3;
font-weight: bold;
}
Result
BootstrapCreative.com : 31
Flexbox Reference
FLEXBOX ITEM
CSS Bootstrap 4
FLEXBOX ITEM
Step 2: Do you want to have this item take up more space than
the other items?
CSS Bootstrap 4
[number]
default is 0
Flexbox Reference
FLEXBOX ITEM
CSS Bootstrap 4
[number]
default is 0
FLEXBOX ITEM
Step 4: Do you want to set the default size of this item before
the other item sizes are set?
CSS Bootstrap 4
[length]
A number followed by px, em, rem, or %.
Check the docs for additional keywords
auto (default)
look at my width or height property
BootstrapCreative.com : 33
Flexbox Reference
FLEXBOX ITEM
CSS Bootstrap 4
CSS Bootstrap 4
example:
Three values: flex-grow | flex-shrink | flex-
basis flex: 2 2 10%;
BootstrapCreative.com : 35
Colors Reference
BootstrapCreative.com : 36
Colors Reference
Colors Reference
How to use RGBA in your CSS
.rgba-color {color: rgba(2, 117, 216, 0.5);}
RGBA is a lot like light shining through a stained glass window. The more light that shines
through the window, the brighter the color. The less light shining through the window, the color
becomes darker. RGBA stands for red, green, blue, and alpha. Each color has a maximum value
of 255. If all RGB values are the same you will have a gray value. The maximum value for Alpha is
1, which means 100%. A lower alpha value will allow background colors ot show through.
Key
A: Link hover J: Danger alert background
B: Input focus border color K: Warning
C: Primary L: Warning alert background
D: Primary alert background M: Info
E: Secondary N: Info alert background
F: Secondary alert background O: Light
G: Success P: Light alert background
H: Success alert background Q: Dark
I: Danger R: Dark alert background
BootstrapCreative.com : 37
Colors Reference
Primary
HEX A HEX B HEX
# 007bff # 0069d9 # 80bdff
Grays
HEX HEX HEX HEX
# fff # f8f9fa # e9ecef # dee2e6
Contextual
C HEX D HEX E HEX F HEX
# 007bff # cce5ff # 868e96 # e7e8ea
BootstrapCreative.com : 39
Bootstrap 3
BootstrapCreative.com : 40
Bootstrap 3
Bootstrap 3.4.0
CSS
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.0/css/
bootstrap.min.css" integrity="sha384-PmY9l28YgO4JwMKbTvgaS7XNZJ30MK9FAZjjzXtlqyZCqBY6X
6bXIkM++IkyinN+" crossorigin="anonymous">
JS
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></
script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"
integrity="sha384-vhJnz1OVIdLktyixHY4Uk3OHEwdQqPppqYR8+5mjsauETgLOcEynD9oPHhhz18Nw"
crossorigin="anonymous"></script>
BootstrapCreative.com : 41
Bootstrap 3
Grid Text & Images
.text-left Left aligned text
Basic grid - full width is 12 columns wide
.text-center Center aligned text
<!-- change .container to .container-fluid
.text-right Right aligned text
to be full width -->
.text-justify Justified text
<div class="container">
.text-nowrap No wrap text
<!-- Columns are always 50% wide, on
mobile and desktop --> .text-lowercause Lowercase text
<div class="row"> .text-uppercase Uppercase text
<div class="col-xs-6">.col-xs-6</div> .text-capitalize Capitalized text
<div class="col-xs-6">.col-xs-6</div> .lead Good for first paragraph of article
</div> .list-unstyled Removes default list
margin/padding
<!-- nested columns example -->
.list-inline Makes list items inline
<div class="row">
.dl-horizontal Makes list items two
<div class="col-xs-6">.col-xs-6</div>
columns
<div class="col-xs-6">.col-xs-6
.img-responsive Make an image responsive
<div class="row">
.img-rounded Adds rounded corners to
<div class="col-md-6">100% mobile image
50% everywhere else</div>
.img-circle Crops image to be circle
<div class="col-md-6">100% mobile
.img-thumbnail Adds rounded corner and
50% everywhere else</div>
border to an image
</div>
.pull-left Floats item left
</div>
.pull-right Floats item right
</div>
.center-block Set an elemennt to block
</div> with auto left and right margin
.clearfix Clear floats by adding this
Media queries
class to the parent container
/* Extra small devices (phones, less than
768px) No media query since this is the Blockquote
default in Bootstrap */
<blockquote><p>Lorem ipsum dolor</p>
/* small (tablets, 768px and up) */
<footer>Someone famous in <cite
@media (min-width: @screen-sm-min) { ... } title="Source Title">Source Title</
/* medium (desktops, 992px and up) */ cite></footer></blockquote>
@media (min-width: @screen-md-min) { ... }
Headings
/* large (large desktops, 1200px and up)
*/ <h1>h1. Bootstrap heading
<small>Secondary text</small></h1>
@media (min-width: @screen-lg-min) { ... }
<p class="h1">Paragraph that looks like
heading</p>
Bootstrap 3
Navbar
<!-- Fixed top navbar with brand as logo image tags -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><img alt="Brand" src="..."></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></
a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
BootstrapCreative.com : 43
Bootstrap 3
Forms
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1"
placeholder="Email">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1"
placeholder="Password">
</div>
<div class="form-group">
<label for="exampleInputFile">File input</label>
<input type="file" id="exampleInputFile">
<p class="help-block">Example block-level help text here.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Check me out
</label>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
Buttons
.btn Needs to be added to all buttons because it adds padding and margin
.btn-default The default button style
.btn-primary The button that has the primary action in a group
.btn-success Could be used on the last submit button in a form
.btn-info Informational button
.btn-link Removes background color and add text color
.btn-(lg,sm, xs) Large buttom, smaller than default button, even smaller
.btn-block Button that spans full width of parent
Example
<a class="btn btn-default" href="#" role="button">Link</a>
Bootstrap 3
Carousel
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
...
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-
slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button"
data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
BootstrapCreative.com : 45
Bootstrap 3
Jumbotron
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>...</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
</div>
To make the jumbotron full width, and without rounded corners, place it outside all
.containers and instead add a .container within.
<div class="jumbotron">
<div class="container">
...
</div>
</div>
Page header
<div class="page-header">
<h1>Example page header <small>Subtext for header</small></h1>
</div>
Breadcrumbs
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li class="active">Data</li>
</ol>
Responsive embed
<!-- 16:9 aspect ratio - change aspect ratio by replacing 16by9 with 4by3 -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
Bootstrap 3
Tables
<!-- Responsive table with all of the options applied -->
<div class="table-responsive">
<table class="table table-condensed table-hover table-bordered table-striped">
<tr class="active">...</tr>
<tr>
<td class="info">...</td>
</tr>
</table>
</div>
BootstrapCreative.com : 47
Bootstrap 3
Alphabetical Index of CSS Classes
.active .caret
.affix .carousel
.alert .carousel-caption
.alert-danger .carousel-control
.alert-dismissible .carousel-indicators
.alert-info .carousel-inner
.alert-link .center-block
.alert-success .checkbox
.alert-warning .checkbox-inline
.arrow .close
.badge .col-lg-* /*(1-12)*/
.bg-danger .col-lg-offset-* /*(0-12)*/
.bg-info .col-lg-pull-* /*(0-12)*/
.bg-primary .col-lg-push-* /*(0-12)*/
.bg-success .col-md-* /*(1-12)*/
.bg-warning .col-md-offset-* /*(0-12)*/
.bottom .col-md-pull-* /*(0-12)*/
.breadcrumb .col-md-push-* /*(0-12)*/
.btn .col-sm-* /*(1-12)*/
.btn-block .col-sm-offset-* /*(0-12)*/
.btn-danger .col-sm-pull-* /*(0-12)*/
.btn-default .col-sm-push-* /*(0-12)*/
.btn-group .col-xs-* /*(1-12)*/
.btn-group-justified .col-xs-offset-* /*(0-12)*/
.btn-group-vertical .col-xs-pull-* /*(0-12)*/
.btn-info .col-xs-push-* /*(0-12)*/
.btn-link .collapse
.btn-primary .collapsing
.btn-sm .container
.btn-success .container-fluid
.btn-toolbar .control-label
.btn-warning .divider
.btn-xs .dropdown
.caption .dropdown-backdrop
Bootstrap 3
.dropdown-header .img-thumbnail
.dropdown-menu .in
.dropdown-menu-left .initialism
.dropdown-menu-right .input-group
.dropdown-toggle .input-group-addon
.embed-responsive .input-group-btn
.embed-responsive-16by9 .input-lg
.embed-responsive-4by3 .input-sm
.fade .invisible
.form-control .item
.form-control-feedback .jumbotron
.form-control-static .label
.form-group .label-danger
.glyphicon .label-default
.glyphicon-chevron-left .label-info
.glyphicon-chevron-right .label-primary
.h1 .label-success
.h2 .label-warning
.h3 .lead
.h4 .left
.h5 .list-group
.h6 .list-group-item
.has-feedback .list-group-item-danger
.help-block .list-group-item-heading
.hidden .list-group-item-info
.hidden-lg .list-group-item-success
.hidden-md .list-group-item-text
.hidden-print .list-group-item-warning
.hidden-sm .list-inline
.hidden-xs .list-unstyled
.hide .mark
.icon-bar .media
.icon-next .media-body
.icon-prev .media-heading
.img-circle .media-list
.img-rounded .media-object
BootstrapCreative.com : 49
Bootstrap 3
.modal .pager
.modal-backdrop .pagination
.modal-body .panel
.modal-content .panel-body
.modal-dialog .panel-danger
.modal-footer .panel-default
.modal-header .panel-footer
.modal-lg .panel-group
.modal-open .panel-heading
.modal-scrollbar-measure .panel-info
.modal-sm .panel-primary
.modal-title .panel-success
.nav .panel-title
.nav-divider .panel-warning
.nav-justified .popover
.nav-tabs .popover-content
.nav-tabs-justified .popover-title
.navbar .pre-scrollable
.navbar-brand .prev
.navbar-btn .progress
.navbar-collapse .progress-bar
.navbar-default .progress-bar-danger
.navbar-fixed-bottom .progress-bar-info
.navbar-fixed-top .progress-bar-striped
.navbar-form .progress-bar-success
.navbar-header .progress-bar-warning
.navbar-inverse .pull-left
.navbar-left .pull-right
.navbar-link .right
.navbar-nav .row
.navbar-right .row-no-gutters
.navbar-static-top .show
.navbar-text .small
.navbar-toggle .sr-only
.next .tab-pane
.page-header .table
Bootstrap 3
.table-bordered .visible-sm-inline
.table-responsive .visible-sm-inline-block
.text-capitalize .visible-xs
.text-center .visible-xs-block
.text-danger .visible-xs-inline
.text-hide .visible-xs-inline-block
.text-info .well
.text-justify .well-lg
.text-left .well-sm
.text-lowercase
.text-muted
.text-nowrap
.text-primary
.text-right
.text-success
.text-uppercase
.text-warning
.thumbnail
.tooltip
.tooltip-arrow
.tooltip-inner
.top
.visible-lg
.visible-lg-block
.visible-lg-inline
.visible-lg-inline-block
.visible-md
.visible-md-block
.visible-md-inline
.visible-md-inline-block
.visible-print
.visible-print-block
.visible-print-inline
.visible-print-inline-block
.visible-sm
.visible-sm-block
BootstrapCreative.com : 51
Resources
BootstrapCreative.com : 52
Resources
Design Inspiration CSS Reference
• Bootstrap Expo • Mozilla CSS Reference
https://expo.getbootstrap.com/ https://developer.mozilla.org/en-US/
• Built With Bootstrap docs/Web/CSS/Reference
http://builtwithbootstrap.com/ • CSS-Tricks Almanac
• Wrap Bootstrap https://css-tricks.com/almanac/
https://wrapbootstrap.com/ • Can I Use?
• Official Bootstrap Themes https://caniuse.com/
https://themes.getbootstrap.com/ • CSSreference.io
• AWWWARDS https://cssreference.io/
https://www.awwwards.com/websites/
responsive-design/
• Media Queries
JavaScript Reference
• Mozilla JavaScript Reference
https://mediaqueri.es/
https://developer.mozilla.org/en-US/
• Pattern Tap docs/Web/JavaScript/Reference
http://zurb.com/patterntap
• jQuery Documentation
• CodePen Pattern Library https://api.jquery.com/
http://codepen.io/patterns/
• Building Blocks
http://foundation.zurb.com/building- Bootstrap Reference
blocks/ • Bootstrap 4 Classes Reference
https://bootstrapcreative.com/resourc-
es/bootstrap-4-css-classes-index/
BootstrapCreative.com : 53
Resources
https://bootstrapcreative.com/pattern/
BootstrapCreative.com : 55
Notes
BootstrapCreative.com : 56
Notes
BootstrapCreative.com : 57
Notes
Notes
BootstrapCreative.com : 59
Notes
Notes
BootstrapCreative.com : 61
Notes
Notes
BootstrapCreative.com : 63
Notes
Notes
Find an error?
Or have a comment?
Contact support@bootstrapcreative.com
BootstrapCreative.com : 65