We cover the following 'skills' below, Containers, Grid System, Tables, Jumbotron, Nav | Navbars, and Utilities. Wantedt to share how to place content on a webpage, especially if you've not been exposed to HTML, HTML/CSS and how text/media is formed on the page. We will continue to modify the following sections.
We are moving onward and upward, or is downward depending on how you 'visualize' learning code... Here we move down, moving ever so deeper into the trench, nearing the 5000m marker as we make our decent down to this 'virtual' Mariana Trench. Thus far we have cleared the surface, the light of the sea, past the point of no light and sinking down into the abyssal plain. At some 5000m below the surface, we start with the advanced set of Bootstrap 4 classes and attributes to kick up your website experience, driving to solidify your user experience. Our goal is The Mariana Trench of Website design and experience, so off we go.
Collapse, collapse is a great feature for limited space and content driven experiences. The user will interact with different panels to read and experience through the idea of 'page' turning or collapsing pages or more importantly a 'show'/'hide' or an 'accordion' feature for containers.
.collapse data-toggle="collapse" target="#demo"
- Toggle or Collapse (Show/Hide)#demo .collapse
- Include div container which will ultimately 'show or hide' based on the user interaction..collapse show
- add this show class to the open or show div when implementing an accordion class or styled collapsible content feature.We are moving onward and upward, or is downward depending on how you 'visualize' learning code... Here we move down, moving ever so deeper into the trench, nearing the 5000m marker as we make our decent down to this 'virtual' Mariana Trench. Thus far we have cleared the surface, the light of the sea, past the point of no light and sinking down into the abyssal plain. At some 5000m below the surface, we start with the advanced set of Bootstrap 4 classes and attributes to kick up your website experience, driving to solidify your user experience. Our goal is The Mariana Trench of Website design and experience, so off we go.
Collapse, collapse is a great feature for limited space and content driven experiences. The user will interact with different panels to read and experience through the idea of 'page' turning or collapsing pages or more importantly a 'show'/'hide' or an 'accordion' feature for containers.
"Scotty, We Need More Power!" "I'm Giving Her All She's Got Captain!".
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Consequat nisl vel pretium lectus quam. Id venenatis a condimentum vitae sapien pellentesque habitant morbi. Auctor eu augue ut lectus arcu bibendum at varius. Ut porttitor leo a diam sollicitudin tempor.
In ornare quam viverra orci sagittis eu volutpat. Tincidunt eget nullam non nisi est sit amet facilisis magna. Lacus suspendisse faucibus interdum posuere lorem ipsum. Tincidunt lobortis feugiat vivamus at augue eget. Elementum facilisis leo vel fringilla est. Elementum nisi quis eleifend quam adipiscing vitae.
Erat imperdiet sed euismod nisi porta. Ac feugiat sed lectus vestibulum mattis ullamcorper velit sed ullamcorper. Viverra mauris in aliquam sem fringilla ut morbi tincidunt. Egestas dui id ornare arcu odio. Massa ultricies mi quis hendrerit. Id aliquet risus feugiat in ante metus dictum. Aliquam eleifend mi in nulla posuere sollicitudin. Faucibus ornare suspendisse sed nisi lacus sed. Sem nulla pharetra diam sit.
Ipsum suspendisse ultrices gravida dictum fusce ut. Venenatis cras sed felis eget velit aliquet sagittis id consectetur. Tellus elementum sagittis vitae et leo. Pellentesque sit amet porttitor eget dolor morbi non arcu risus. Mollis aliquam ut porttitor leo a diam sollicitudin tempor id.
Nunc non blandit massa enim nec. Augue eget arcu dictum varius duis at consectetur lorem donec. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Ornare aenean euismod elementum nisi quis eleifend quam adipiscing.
Odio ut sem nulla pharetra diam. Est pellentesque elit ullamcorper dignissim cras tincidunt. Quis viverra nibh cras pulvinar mattis nunc sed. Suspendisse in est ante in nibh mauris cursus mattis molestie. Integer eget aliquet nibh praesent tristique. Mattis rhoncus urna neque viverra justo. Luctus venenatis lectus magna fringilla. Lacus vel facilisis volutpat est velit egestas dui id ornare.
Arcu non sodales neque sodales ut etiam. Quis auctor elit sed vulputate mi. Scelerisque viverra mauris in aliquam sem fringilla. Vitae congue eu consequat ac felis donec. Ut etiam sit amet nisl purus in mollis nunc. Bibendum arcu vitae elementum curabitur vitae nunc sed. Mattis vulputate enim nulla aliquet porttitor lacus luctus. Netus et malesuada fames ac turpis egestas integer. Id aliquet lectus proin nibh nisl condimentum id venenatis a. Aliquam eleifend mi in nulla posuere sollicitudin. Turpis tincidunt id aliquet risus. Scelerisque purus semper eget duis at tellus at. At in tellus integer feugiat scelerisque varius morbi. Penatibus et magnis dis parturient montes nascetur. Id ornare arcu odio ut sem nulla pharetra. Amet tellus cras adipiscing enim eu. At varius vel pharetra vel turpis nunc eget lorem dolor. Elit duis tristique sollicitudin nibh sit amet commodo. Facilisis volutpat est velit egestas dui id ornare arcu.
Tristique senectus et netus et malesuada fames. Est lorem ipsum dolor sit amet consectetur adipiscing. Risus ultricies tristique nulla aliquet enim tortor. Semper feugiat nibh sed pulvinar. Eget velit aliquet sagittis id consectetur purus ut faucibus. Phasellus vestibulum lorem sed risus ultricies tristique nulla aliquet enim. Mauris sit amet massa vitae tortor condimentum lacinia quis vel. Sed augue lacus viverra vitae congue eu consequat. Dignissim enim sit amet venenatis urna cursus eget. Urna condimentum mattis pellentesque id nibh tortor. Ante in nibh mauris cursus. Donec massa sapien faucibus et.
Elementum pulvinar etiam non quam lacus suspendisse faucibus interdum. Ridiculus mus mauris vitae ultricies leo integer. Scelerisque in dictum non consectetur a. Amet commodo nulla facilisi nullam vehicula ipsum a arcu. Neque volutpat ac tincidunt vitae semper quis. Nisl vel pretium lectus quam id leo in. Nunc mi ipsum faucibus vitae aliquet nec ullamcorper sit amet. Magna etiam tempor orci eu. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras.
Code Snippet - Collapse, Accordion
<div class='accordian'>
<div class='container-fluid'>
<div class='card'>
<div class='card-header'>
<a class='card-link' data-toggle='collapse' href='#contain1'>Click Show/Hide 1</a></div>
<div id='contain1' class='collapse' data-parent='#accordion'>
<div class='card-body'><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Consequat nisl vel pretium lectus quam. Id venenatis a condimentum vitae sapien pellentesque habitant morbi. Auctor eu augue ut lectus arcu bibendum at varius. Ut porttitor leo a diam sollicitudin tempor.</p>
<p>In ornare quam viverra orci sagittis eu volutpat. Tincidunt eget nullam non nisi est sit amet facilisis magna. Lacus suspendisse faucibus interdum posuere lorem ipsum. Tincidunt lobortis feugiat vivamus at augue eget. Elementum facilisis leo vel fringilla est. Elementum nisi quis eleifend quam adipiscing vitae.</p>
<p>Erat imperdiet sed euismod nisi porta. Ac feugiat sed lectus vestibulum mattis ullamcorper velit sed ullamcorper. Viverra mauris in aliquam sem fringilla ut morbi tincidunt. Egestas dui id ornare arcu odio. Massa ultricies mi quis hendrerit. Id aliquet risus feugiat in ante metus dictum. Aliquam eleifend mi in nulla posuere sollicitudin. Faucibus ornare suspendisse sed nisi lacus sed. Sem nulla pharetra diam sit.</p>
</div>
</div>
</div>
</div>
</div>
<div class='card'>
<div class='card-header'><a class='card-link' data-toggle='collapse' href='#contain2'>
Click Show/Hide 2</a></div>
<div id='contain2' class='collapse' data-parent='#accordion'>
<div class='card-body'><p>Ipsum suspendisse ultrices gravida dictum fusce ut. Venenatis cras sed felis eget velit aliquet sagittis id consectetur. Tellus elementum sagittis vitae et leo. Pellentesque sit amet porttitor eget dolor morbi non arcu risus. Mollis aliquam ut porttitor leo a diam sollicitudin tempor id.</p>
<p>Nunc non blandit massa enim nec. Augue eget arcu dictum varius duis at consectetur lorem donec. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Ornare aenean euismod elementum nisi quis eleifend quam adipiscing. </p>
<p>Odio ut sem nulla pharetra diam. Est pellentesque elit ullamcorper dignissim cras tincidunt. Quis viverra nibh cras pulvinar mattis nunc sed. Suspendisse in est ante in nibh mauris cursus mattis molestie. Integer eget aliquet nibh praesent tristique. Mattis rhoncus urna neque viverra justo. Luctus venenatis lectus magna fringilla. Lacus vel facilisis volutpat est velit egestas dui id ornare.</p>
</div>
</div>
</div>
</div>
</div>
<div class='card'>
<div class='card-header'><a class='card-link' data-toggle='collapse' href='#contain3'>
Click Show/Hide 3</a></div>
<div id='contain3' class='collapse show' data-parent='#accordion'>
<div class='card-body'><p>Arcu non sodales neque sodales ut etiam. Quis auctor elit sed vulputate mi. Scelerisque viverra mauris in aliquam sem fringilla. Vitae congue eu consequat ac felis donec. Ut etiam sit amet nisl purus in mollis nunc. Bibendum arcu vitae elementum curabitur vitae nunc sed. Mattis vulputate enim nulla aliquet porttitor lacus luctus. Netus et malesuada fames ac turpis egestas integer. Id aliquet lectus proin nibh nisl condimentum id venenatis a. Aliquam eleifend mi in nulla posuere sollicitudin. Turpis tincidunt id aliquet risus. Scelerisque purus semper eget duis at tellus at. At in tellus integer feugiat scelerisque varius morbi. Penatibus et magnis dis parturient montes nascetur. Id ornare arcu odio ut sem nulla pharetra. Amet tellus cras adipiscing enim eu. At varius vel pharetra vel turpis nunc eget lorem dolor. Elit duis tristique sollicitudin nibh sit amet commodo. Facilisis volutpat est velit egestas dui id ornare arcu.</p>
<p>Tristique senectus et netus et malesuada fames. Est lorem ipsum dolor sit amet consectetur adipiscing. Risus ultricies tristique nulla aliquet enim tortor. Semper feugiat nibh sed pulvinar. Eget velit aliquet sagittis id consectetur purus ut faucibus. Phasellus vestibulum lorem sed risus ultricies tristique nulla aliquet enim. Mauris sit amet massa vitae tortor condimentum lacinia quis vel. Sed augue lacus viverra vitae congue eu consequat. Dignissim enim sit amet venenatis urna cursus eget. Urna condimentum mattis pellentesque id nibh tortor. Ante in nibh mauris cursus. Donec massa sapien faucibus et.</p>
</div>
</div>
</div>
</div>
</div>
<div class='card'>
<div class='card-header'><a class='card-link' data-toggle='collapse' href='#contain4'>
Click Show/Hide 4</a></div>
<div id='contain4' class='collapse' data-parent='#accordion'>
<div class='card-body'><p>Elementum pulvinar etiam non quam lacus suspendisse faucibus interdum. Ridiculus mus mauris vitae ultricies leo integer. Scelerisque in dictum non consectetur a. Amet commodo nulla facilisi nullam vehicula ipsum a arcu. Neque volutpat ac tincidunt vitae semper quis. Nisl vel pretium lectus quam id leo in. Nunc mi ipsum faucibus vitae aliquet nec ullamcorper sit amet. Magna etiam tempor orci eu. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras.</p>
</div>
</div>
</div>
</div>
</div>
</div>
What's this, a way to align content types without floats and absolute positioned containers? Yes, yes there is! Try Media Objects, a flexible way to align assets such as images and videos with content contained in a wrapper. The most basic media objects can be found on social media, such as profile images and summary, posts including avatar and comment. Ditto for reposts, comments and subcomments. More to come.
.media media-body
- Calling the media class along with it's subclass counter part will provide the needed containers to split the content left and right, top and bottom. Alignment example included as well.media align-self-center"
- Although we don't provide all examples, this class aligns the icon element to the center of the media body element.Containing a title element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared.
Containing a title element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared.
Containing a title element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared.
Containing a title element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared.
Containing a title element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared.
Containing a t itle element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared. Also, we included a few lines of Lorem Ipsom to fill the container and force the media object to the correct alignment. Tristique senectus et netus et malesuada fames. Est lorem ipsum dolor sit amet consectetur adipiscing. Risus ultricies tristique nulla aliquet enim tortor. Semper feugiat nibh sed pulvinar. Eget velit aliquet sagittis id consectetur purus ut faucibus. Phasellus vestibulum lorem sed risus ultricies tristique nulla aliquet enim.
Elementum pulvinar etiam non quam lacus suspendisse faucibus interdum. Ridiculus mus mauris vitae ultricies leo integer. Scelerisque in dictum non consectetur a. Amet commodo nulla facilisi nullam vehicula ipsum a arcu. Neque volutpat ac tincidunt vitae semper quis. Nisl vel pretium lectus quam id leo in. Nunc mi ipsum faucibus vitae aliquet nec ullamcorper sit amet. Magna etiam tempor orci eu. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras. Tristique senectus et netus et malesuada fames ac turpis egestas.
Code Snippet - Media Object
<div class='example border p-5'>
<div class='container-fluid'>
<div class='media'>
<div class='img-thumbnail addIn'>
<i class='fas fa-user logo3'></i></div>
<div class='media-body'>
<h4>Media Object Example</h4>
<p>Containing a title element and a small sentence created in a ficitional post which shares a second users opinion/feedback on the post or comment shared.</p>
</div>
</div>
</div>
</div>
</div>
Like Collapse (Show/Hide) and Accordions, Carousels allow the user to read various elements, content, images and or video without moving or scrolling down the page. The carousel and it's content will revolve or cycle through content contained within its container. Ideally, videos and image together with text to create a collection of 'mini' slideshows for your users to quickly consume and readthrough content.
.carousel slide data-ride="carousel
- .carousel-indicators
- .carousel-inner
- .carousel-item
- .carousel-control-prev
- .carousel-control-next
- Code Snippet - Carousels
<div class='example border p-5'>
<div class='container-fluid'>
<div id='demo' class='carousel slide' data-ride='carousel'>
<ul class='carousel-indicators'>
<li data-target='#demo' data-slide-to='0' class='active'></li>
<li data-target='#demo' data-slide-to='1'></li>
<li data-target='#demo' data-slide-to='2'></li>
</ul>
<div class='carousel-inner bg-grey'>
<div class='carousel-item active text-center'>
<img src='#' style='max-width: 500px;' alt='Image Asset 1'>
<div class='carousel-caption'>
<h4>Image Assets (1)</h4>
<p>Have a look at image asset 1</p>
</div>
</div>
<div class='carousel-item text-center'>
<img src='#' style='max-width: 500px;' alt='Image Asset 2'>
<div class='carousel-caption'>
<h4>Image Assets (2)</h4>
<p>Have a look at this second image asset, asset 2</p>
</div>
</div>
<div class='carousel-item text-center'>
<img src='#' style='max-width: 500px;' alt='Image Asset 3'>
<div class='carousel-caption'>
<h4>Image Assets (3)</h4>
<p>Last and Final Image Asset (3)</p>
</div>
</div>
</div>
<a class='carousel-control-prev' href='#demo' data-slide='prev'>
<span class='carousel-control-prev-icon'></span>
</a>
<a class='carousel-control-next' href='#demo' data-slide='next'>
<span class='carousel-control-next-icon'></span>
</a>
</div>
</div>
</div>
Modals are the new dialog box of recent past. Dialog boxes are used to alert the user or prompt the user to take some action. Or Overlays requesting users to join list upon list.... Similarily, modals can show additional content, in a tasteful manner. The user selects some action to see more, additional hightlighted feature/featured images, videos above the main content. Modals allow the developer to focus content for the user, while providing the necessary button or click events to return to the main experience or content.
.card
- Code Snippet - Modals
<div class='example border p-5'>
<div class='container-fluid'>
<h2>Modal Container</h2>
<button type='button' class='btn btn-dark' data-toggle='modal' data-target='#myModalContainer'>Click Modal</button>
<div id='myModalContainer' class='container-fluid modal'>
<div class='modal-dialog'>
<div class='modal-content'>
<div class='modal-header'>
<h4 class='modal-title'>Modal Heading</h4>
<button type='button' class='close' data-dismiss='modal'>×</button>
</div>
<div class='modal-body'>
<div class='row d-flex justify-content-center'>
<div class='p-2 flex-fill'>
<h4>Modal Content (Modal) <i class='fas fa-vector-square logo4'></i></h4>
<p>We are moving onward and upward, or is downward depending on how you 'visualize' learning code... Here we move down, moving ever so deeper into the trench, nearing the 8000m marker as we make our decent down to this 'virtual' Mariana Trench. Thus far we have cleared the surface, the light of the sea, past the point of no light and sinking down into the abyssal plain.</p>
<p>Modals, modals can be great for additional information or draw more focus on featured content, images or videos in which the user has 'chosen' to view more or read about in further detail. collapse is a great feature for limited space and content driven experiences.</p>
</div>
</div>
<div class='row d-flex justify-content-center'>
<div class='p-2 mb-4 flex-fill'>
<blockquote>'Scotty, We Need More Power!'.</p>
<footer class='blockquote-footer noSpace'>Chief Engineer, Montgomery 'Scotty' Scott </footer>
</blockquote>
</div>
</div>
</div>
Someone get me some toast! Not that kind of toast, Bootstrap'n toast. This one includes some JQuery, an alert text box that opens for a few seconds depending on toast timing. Toast is a great alternative for form messages, submission, error and success. Let's have a closer look and where you might use a toast component.
Toast Code
.toast
- Toast alert, popup ~3-5 secondsJQuery Code Snippet - Toast Method
<script> $(document).ready(function(){ $('.toast').toast('show'); }); </script>
Code Snippet - Toast
<div class='example border p-5'>
<div class='container-fluid'>
<script>
$(document).ready(function(){
$('#aBtn').click(function(){
$('.toast').toast('show');
});
});
</script>
<button type='button' class='btn btn-dark' id='aBtn'>Toast Me</button>
<div class='toast'>
<div class='toast-header'><strong>My Toast</strong>
</div>
<div class='toast-body'>Toast Content</div>
</div>
</div>
</div>
.progress
- .progress-bar
- .progress-bar-striped
- .progress-bar progress-bar-striped progress-bar-animated
- Code Snippet - Progress Bar
<div class='example border p-5'>
<div class='container-fluid'>
<div class='progress'>
<div class='progress-bar' style='width:40%;'>40%</div>
</div>
<div class='progress'>
<div class='progress-bar bg-success progress-bar' style='width:40%;'>40%</div>
</div>
<div class='progress'>
<div class='progress-bar progress-bar-striped progress-bar-animated' style='width:60%;'>60%</div>
</div>
<div class='progress'>
<div class='progress-bar bg-success progress-bar-striped progress-bar-animated' style='width:60%;'>60%</div>
</div>
</div>
</div>
Badging is straight forward, need a class for 'extra or additional' details? A badge might just be the thing. Badging can be scaled, 'painted', transformed and modified to include text and other badging for greater detail. Painted just refers to color, following the color patterned developed with Bootstrap or create your own.
.badge
- .badge-success
- .badge-pill
- Code Snippet - Badges
<div class='example border p-5'>
<div class='container-fluid'>
<div class='row d-flex justify-content-left'>
<span class='badge badge-success mx-1 px-4 py-2'>Success</span>
<span class='badge badge-warning mx-1 px-4 py-2'>Warning</span>
<span class='badge badge-dark mx-1 px-4 py-2'>Dark</span>
<span class='empty'></span>
<span class='badge badge-pill badge-success mx-1 px-4 py-2'>Success</span>
<span class='badge badge-pill badge-warning mx-1 px-4 py-2'>Warning</span>
<span class='badge badge-pill badge-dark mx-1 px-4 py-2'>Dark</span>
</div>
Spinners or loading class, helps the user pause and understand something is being processed or is currently under process. Spinners come in various shapes, sizes and animation style, again, following the standards set forth in the Bootstrap design guide.
.spinner-border
- .spinner-grow
- Code Snippet - Spinner
<div class='example border p-5'>
<div class='container-fluid'>
<div class='spinner-border text-muted'></div>
<div class='spinner-grow text-muted'></div>
<button class='btn btn-muted'>
<span class='spinner-border spinner-border-sm'></span>
Email
</button>
</div>
</div>
Last up under the Bootstrap Advanced moniker, we have filtering, which may or may not be 'advanced' per say. The reason it's here for now is the reliance on dyanmic data or at least other data inorder for this to work. If your just starting out, this may or may not be at the top of your active list of 'must-haves'. So, with a searchable container, we use the filter to process data. So, what code do we cover? We'll again, this code relies on JQuery to process i.e. filter data. One final note, be aware of uppercase/lowercase and case specificity.
JQuery Filter Code
<script> $(document).ready(function(){ $("#aInput").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#aList li").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); }); </script>
Code Snippet - Filters
<div class='example border p-5'>
<div class='container-fluid'>
<script>
$(document).ready(function(){
$('#aInput').on('keyup', function() {
var value = $(this).val().toLowerCase();
$('#aList li').filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});
</script>
<div class='input-group-append'>
<i class='fas fa-search logo4 p-2'></i>
<input type='text' class='form-control' id='aInput' placeholder='Search Me...'>
</div>
<ul class='list-group' id='aList'>
<li class='list-group-item'>Containers</li>
<li class='list-group-item'>Basic Bootstrap'n</li>
<li class='list-group-item'>Advanced Bootstrap'n</li>
<li class='list-group-item'>Bootstrap Reference</li>
</ul>
</div>
</div>
Examples of both Fixed and Full-width, always mobile first
Need Help? How might we help? Connect with us, reach out via email, phone or contact form