Bootstrap reminders Flashcards
simple nav
ul. nav
li. nav-item
a. nav-link.active
li. nav-item
a. nav-link
li. nav-item
a. nav-link
creating a simple nav-bar with brand
nav. navbar.navbar-expand-sm.navbar-dark.bg-dark
a. navbar-brand
ul. navbar-nav
li. nav-item
a. nav-link.active
li. nav-item
a. nav-link
li. nav-item
a. nav-link
components of a mobile-friendly navbar
A button that shows up on mobile size:
button. navbar-toggler:data-toggle=’collapse’:data-target=’#target1’
span. navbar-toggler-icon
A container holding the normal nav that is normally collapsed unless in mobile sizes:
div.navbar-collapse.collapse#target1 //normal nav...
simple dropdown
a container holding the dropdown content and dropdown toggle:
div.dropdown
a dropdown toggle:
button.dropdown-toggle:data-toggle=’dropdown’
a dropdown menu with the links:
div. dropdown-menu
a. dropdown-item
Simple alert
div.alert.alert-[color]
“message”
alert with link
div.alert.alert-[color]
“message” span.alert-link
alert with heading
div. alert.alert-[color]
h4. alert-heading
alert with horizontal divider
div.alert.alert-[color]
“message”
hr
“message 2”
alert with close button
div.alert.alert-[color]
“message”
button.close:data-dismiss=’alert’ ×
grid system
div. row
div. col
div. col
div. row
div. col
col class that expands when in small size an shrinks when in medium
div.col-md-3.col-sm-12
center content with flexbox when on medium size
div.d-flex.justify-content-md-center
offsetting a column by:
3 on medium;
by 4;
2 on small;
offset-md-3;
offset-4;
offset-sm-2.
make images responsive
img.img-fluid
give image a 1px rounded border
img.img-thumbnail