I am struggling with Bootstrap 4.1 as I try to align content to the right side. Specifically, I have a Navigation Bar that triggers a Modal Dialog containing Tabs. The dropdown menu on the far right of the Tab is what I want to justify to the right. Here are the methods I've attempted:
- Added
ml-auto
to the
tag in the section labeled "Modal - Drop Down"<li class='nav-item active dropdown'>
- Added
mr-auto
to the
tag in the section labeled "Modal - Drop Down"<ul class="nav nav-tabs mr-auto" role="tablist">
- Added
justify-content-end
to the
tag in the section labeled "Modal - Drop Down"<li class="nav-item active dropdown justify-content-end">
- Added
ml-auto
to the
tag in the section labeled "Modal - Drop Down"<li class="nav-item active dropdown justify-content-end ml-auto">
- Attempted various Flex classes such as:
<div class="d-flex flex-row-reverse bd-highlight">, <div class="d-flex justify-content-end">, <div class="d-flex align-items-end">, <div class="align-self-end">
Unfortunately, none of these solutions seem to be effective.
Has anyone successfully executed this alignment using Bootstrap 4.1?
You can access my code on JSFiddle: https://jsfiddle.net/tsmolskow/jm19hu3t/66/
Below is the HTML code:
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header"></div>
</div>
</div>
<!-- Navigation Bar -->
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">SharePointGypsy.com</a>
<button class="navbar-toggler collapsed" aria-expanded="false" aria-controls="navbar" aria-label="Toggle navigation" type="button" data-toggle="collapse" data-target="#navbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbar">
<ul class="nav navbar-nav navbar-right">
<li class="nav-item active">
<a class="nav-link" id="Departments" data-toggle="modal" data-target="#MyNNSModal">Departments</a></li>
<li class="nav-item active">
<a class="nav-link" id="Resources" data-toggle="modal" data-target="#MyNNSModal">Resources</a></li>
<li class="nav-item active">
<a class="nav-link" id="Procedures" data-toggle="modal" data-target="#MyNNSModal">Procedures</a></li>
<li class="nav-item active">
<a class="nav-link" id="News" data-toggle="modal" data-target="#MyNNSModal">News</a></li>
</ul>
</div>
</nav>
<!-- Modal -->
<div tabindex="-1" class="modal fade" id="MyNNSModal" role="dialog" aria-hidden="true" aria-labelledby="exampleModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="tabbable">
<!-- Nav Tabs, Modal Nav Bar -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item active">
<a class="nav-link active" href="#aDepartments" data-toggle="tab">Departments</a></li>
<li class="nav-item active">
<a class="nav-link" href="#aResources" data-toggle="tab">Resources</a></li>
<li class="nav-item active">
<a class="nav-link" href="#aProcedures" data-toggle="tab">Procedures</a></li>
<li class="nav-item active">
<a class="nav-link" href="#aNews" data-toggle="tab">News</a></li>
</ul>
</div>
<div class="d-flex align-self-end">
<a class="dropdown-toggle" data-toggle="dropdown" id="navbardrop">
<img src="Images/KoKoPelli.jpg" class="profile-picture"/>
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Newsfeed</a></li>
<li><a class="dropdown-item" href="#">One Drive</a></li>
<li><a class="dropdown-item" href="#">Sites</a></li>
</ul>
</div>
<!-- Close Button -->
<div>
<button class="close" aria-label="Close" type="button" data-dismiss="modal"><span aria-hidden="true"><img class="close-button" src="/sites/dscott/tmfds/SiteAssets/Images/CloseButton.png" alt=""/> </span> </button> </div> </div>
<!-- Panes -->
<div class="modal-body">
<div class="tab-content">
<!-- Tab Panes -->
<div class="tab-pane active" id="aDepartments">
<p>
<b>Departments:</b>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit iusto nulla aperiam blanditiis ad consequatur in dolores culpa, dignissimos, eius non possimus fugiat. Esse ratione fuga, enim, ab officiis totam.</p>
</div>
<div class="tab-pane" id="aResources">
<p>
<b>Resources:</b>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit iusto nulla aperiam blanditiis ad consequatur in dolores culpa, dignissimos, eius non possimus fugiat. Esse ratione fuga, enim, ab officiis totam.</p>
</div>
<div class="tab-pane" id="aProcedures">
<p>
<b>Procedures:</b>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit iusto nulla aperiam blanditiis ad consequatur in dolores culpa, dignissimos, eius non possimus fugiat. Esse ratione fuga, enim, ab officiis totam.</p>
</div>
<div class="tab-pane" id="aNews">
<p>
<b>News:</b>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit iusto nulla aperiam blanditiis ad consequatur in dolores culpa, dignissimos, eius non possimus fugiat. Esse ratione fuga, enim, ab officiis totam.</p>
</div>
</div>
</div>
<!-- Footer -->
<div class="modal-footer"></div>
</div>
</div>
</div>