My Bootstrap container has a fluid width and I'm trying to align three rows within a sidebar to sit at the top, middle, and bottom. I came across this demo in the Bootstrap documentation which shows how to do it for full-width layout, but I need it for a sidebar.
It seems that vertical alignment works with a fixed height, but not with a fluid one (height: 100%). Both the sidebar and content should be the full height of the page. Is there a way to achieve this using Bootstrap classes or perhaps custom classes?
I haven't added any custom CSS yet, just relying on Bootstrap classes. Here's my attempt:
<div class="container-fluid h-100">
<div class="row h-100">
<div id="content" class="col-8 h-100">
<p>Some Content</p>
</div>
<div id="sidebar" class="col-4 h-100">
<div id="logo" class="row align-items-start">
<div class="col text-center">
<p>Test Top</p>
</div>
</div>
<div id="helpful-info" class="row align-items-center">
<div class="col text-center">
<p>Test Middle</p>
</div>
</div>
<div id="side-footer" class="row align-items-end">
<div class="col text-center">
<p>Test Bottom</p>
</div>
</div>
</div>
</div>
</div>