One of the great things about Bootstrap is its ability to rearrange columns regardless of the HTML structure. However, I am looking to have a different order of elements when the viewport size is smaller (e.g., Mobile).
The current HTML structure looks like this:
[Page Content]
[Nav Links]
[Sidebar]
Using Bootstrap 4.1 and its order-first/order-last classes on [Nav Links] and [Sidebar] respectively, the page displays as follows:
[Nav Links][Page Content][Sidebar]
But what I WANT to happen when the viewport shrinks below the break threshold, is for [Nav Links] to move back underneath [Page Content]. The Bootstrap documentation doesn't cover this specific scenario, and the previous methods I found are outdated due to removed classes. Any suggestions?
(Here is the actual code in case something was missed)
<div class="row">
<main class="col-sm-8">
[Page Content]
</main>
<nav class="col-sm-2 px-3 order-first">
[Nav Links]
</nav>
<section class="col-sm-2 order-last">
[Sidebar Content]
</section>
</div>