I have the following code for a footer:
<div class="container"> <hr>
<div class="row">
<div class="col-md-6">
© BusinessName 2017.
</div>
<div class="col-md-3"> <br>
<a href="/blog"> Blog </a> <br>
<a href="/blog"> FAQ </a> <br>
<a href="/blog"> About </a>
</div>
<div class="col-md-3">
<p><strong>Contact</strong> <br> [email protected] <br> more info bla bla <br> more more more info</p>
</div>
</div> </div>
I am trying to align all content on bottom line, I've tried some things but nothing works... any bright ideas?
To align the div content to the bottom, use position: relative to the container class and position: absolute to the div element.
You can use align-items-end
from the new Bootstrap 4 flexbox utilities...
<div class="container">
<hr>
<div class="row align-items-end">
<div class="col-md-6">
© BusinessName 2017.
</div>
<div class="col-md-3">
<a href="/blog"> Blog </a>
<br>
<a href="/blog"> FAQ </a>
<br>
<a href="/blog"> About </a>
</div>
<div class="col-md-3">
<strong>Contact</strong>
<br> [email protected]
<br> more info bla bla
<br> more more more info
</div>
</div>
</div>
http://codeply.com/go/GXTF43toS9
Also, auto margins work inside flexbox. There you could use mt-auto
(margin-top:auto) to "push" the col-* to the bottom.
Row vs col, check it out https://jsfiddle.net/Julesezaar/zyh5a4rb/
For all the columns in the entire row use align-items-end
on the row
<div class="row border align-items-end">
<div class="col">
A (row align-items-end)
<br/>
A<br/>
A<br/>
</div>
<div class="col">
B
</div>
<div class="col">
C
</div>
<div class="col">
D
</div>
</div>
For a single column us align-self-end
on the col
<div class="row border">
<div class="col">
A
</div>
<div class="col">
B<br/>
B<br/>
B<br/>
</div>
<div class="col align-self-end">
C (col align-self-end)
</div>
<div class="col">
D
</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With