I am trying to horizontally center align a button at the bottom of the div. I read some posts and they all suggest using text-align:center; on the parent div, but that isn't working for me.
CSS:
.col-lg-3{
text-align: center;
}
.btn-primary{
position: absolute;
bottom: 0;
HTML:
<div class="col-lg-3">
<h1 class="display-6">Lorem Ipsum</h1>
<p class="text">123456789</p>
<button onclick="window.location.href='projects/test.html'" type="button" class="btn btn-primary" style="margin:0 auto;display:block;">Learn More</button>
</div>
When I run this code the button is at the bottom of the div, but isn't center aligned. Could anyone help me out with this?
Thank You