Bootstrap 4 Flashcards
col-, col-sm-, col-md-, col-lg-, col-xl-
grid sizes for bootstrap 4
.display-1
.display-2
.display-3
.display-4
Larger font-size and lighter font-weight to make headers stand out
<small></small>
Creates a lighter, secondary text in any heading
.text-muted .text-primary .text-success .text-info .text-warning .text-danger .text-secondary .text-white .text-dark .text-body .text-light
Contextual based text classes
.bg-primary .bg-success .bg-info .bg-warning .bg-danger .bg-secondary .bg-dark .bg-light
Background color classes for text. You’ll want to use these in conjunction with .text-* classes.
.table .table-striped .table-bordered .table-hover .table-dark .table-borderless
Classes that can be combined for the most part which creates tables with specific styling according to their names.
.table-primary .table-success .table-danger .table-info .table-warning .table-active .table-secondary .table-light .table-dark
Table classes that set the background of the and tags.
.thead-dark
.thead-light
Styling that makes the table header light or dark
.table-sm
Makes a regular table condensed with a small amount of padding
.table-responsive .table-responsive-sm .table-responsive-md .table-responsive-lg .table-responsive-xl
Creates a scrollable table when the window is below a certain threshold
.rounded
.rounded-circle
.img-thumbnail
.img-fluid (responsive)
Changes the shape of an image according to its description
.jumbotron
.jumbotron-fluid
A large space from which to display important information. Requires the use of a <div> element and be inside a .container or .container-fluid classed div</div>
.alert .alert-success .alert .alert-info .alert .alert-warning .alert .alert-danger .alert .alert-primary .alert .alert-secondary .alert .alert-light .alert .alert-dark
Used to display alerts with contextual background colors. These can be dismissed with Xs on the right hand side.
Must be created within a DIV tag.
alert-link
Added to an alert text to change the color to one that accents the alert contextual background colors
.alert-dismissible
.close
data-dismiss=”alert”
.fade
.show
Used to create an alert that is closable using a × X symbol. Fade and Show are added classes to make the alert fade out when dismissed.
<div>
×
</div>
.btn .btn-* classes can be used on 3 elements
<a></a>
</a>
.btn .btn .btn-primary (blue) .btn .btn-secondary (grey) .btn .btn-success (green) .btn .btn-info (teal) .btn .btn-warning (gold) .btn .btn-danger (red) .btn .btn-dark (black) .btn .btn-light (white) .btn .btn-link (white)
Used for styling bootstrap 4 buttons
.btn .btn-outline-primary .btn .btn-outline-secondary .btn .btn-outline-success .btn .btn-outline-info .btn .btn-outline-warning .btn .btn-outline-danger .btn .btn-outline-dark .btn .btn-outline-light text-dark
Used to style buttons where the borders and text are contextual colors instead of the background
.btn .btn-lg
.btn .btn-sm
Makes button sizes small or large based on description
.btn-block
Makes a button that stretches to fill the containers width
.btn-group (parent div)
.btn .btn-*
.btn-group-lg
.btn-grou-sm
Creates a group of link buttons with styling. -lg and -sm make the buttons smaller or larger.
.badge .badge-primary .badge .badge-secondary .badge .badge-success .badge .badge-danger .badge .badge-warning .badge .badge-info .badge .badge-light .badge .badge-dark
Used with the SPAN tag, creates a “badge” which has a dark background , light text, and rounded button like appearance.
.badge .badge-pill .badge-success
.badge-ill makes the badges “pill shaped” by changing the border radius on the default badge styling.
.progress
.progress-bar .progress-bar-striped
.progress-bar-animated
.bg-*
Creates a progress bar DIV
Parent DIV .progress
Child DIV .progress-bar
requires styling with a width attribute
UL .pagination LI .page-item A .page-link .pagination-lg .pagination-sm .active .disabled
Used to create a pagination navigation menu. You create it using a UL tag with .pagination for the container. You create the list using LI with .page-item class. Then inside that you create the anchors using .page-link class.
.active highlights the current navigation page.
UL .breadcrumb
LI .breadcrumb-item
Creates a bread crumb navigation styled list of page structure you’ve visited.
Photo / Summer / Italy
UL .list-group
LI .list-group-item .list-group-item-action
.list-group-item-success .list-group-item-secondary .list-group-item-info .list-group-item-warning .list-group-item-danger .list-group-item-primary .list-group-item-dark .list-group-item-light
.active
.disabled
Creates a “list group” which is a list of items, that when hovered highlights the background color and font color automatically based on contextual list group class.
What is a “card”?
A bordered box with padding around the contents, includes options for headers, footers, contents, colors etc
Think of it like a license card for content
.card
.card-header
.card-body
.card-footer
.bg-* (background-color to cards)
.card-title
IMG .card-img-top
IMG .card-img-bottom
Creates a bootstrap 4 card, cards are created using DIV elements.
.card-title removes the bottom margins for P elements if it’s the last child. It adds a blue color to any link with hover affects.
Add the .card-img.top/bottom outside the .card-body to span the entire width.
.card-img-overlay
Allows elements to be created in front of the cards background image set with card-img-top or card-img-bottom.
.card-columns (DIV)
.card-text (p)
Creates a column of cards. You can place all your cards inside the .card-columns wrapper div to create a group of cards.
.card-deck (DIV)
Creates a group of cards with equal height and widths, these automatically adjust as you insert more cards.
These cards have spaces in between them, not to be confused with a card-group which each card hugs the other without spacing.
.card-group (DIV)
Creates a group of equally tall and wide cards that fit snugly against the others.
.dropdown (DIV) .dropdown-toggle ( button ) data-toggle="dropdown" (button) .dropdown-menu (DIV) .dropdown-item (A)
.dropdown-item .active
.dropdown-item .disabled
Creates a basic dropdown menu from buttons that expand when clicked. Allows 1 selection.
.dropdown-divider (DIV)
Used to create a dividing line between drop down menu items.
.dropdown-header (DIV)
Used to create a header section for the drop down menu selections
.dropdown-menu .dropdown-menu-right
Allows the drop down to align to the right hand side.
.dropup (DIV)
Creates a dropup menu that pops up instead of down
.dropdown-item-text (A)
.dropdown-item-text (SPAN)
Used for creating plain text dropdown items. Can be used with (A) or (span) to be a link or plain text.
data-toggle=”collapse” (button)
data-target=”#target” (button)
.collapse (div with id #target)
.show
Creates a collapsible div that is activated with a button press.
.button data-toggle=”collapse” data-target=”#demo”.Collapsable.button
.div id=”demo” class=”collapse”.words.
.show will show the content by default
What is an “accordian”?
A group of collapsible divs with content inside each that will open/close like a collapsible toggle item.
.data-parent=”#targetDiv”
Used to create accordians, used in a child DIV to reference the parent container of all collapsible DIVs.
DIV id="accordian" DIV data-parent="#accordian" DIV content DIV data-parent="#accordian" DIV content
.nav (UL)
.nav-item (LI)
.nav-link (A)
.nav-justified
.disabled
.active
Creates a basic horizontal nav menu