I am facing an issue with the styling of a :after class that creates a line under a floated h1 element. The h1 element is floated left, and I want to center the :after line underneath it.
Despite floating it left and attempting a text-center on the parent div, I have not been successful. Any suggestions?
.singleAfterLine {
display: block;
float: left;
height: 2px;
background-color: #55B4B0;
/*Great way to give single line color; see under GET FOOD NOT FAST FOOD */
content: " ";
width: 100px;
margin: 0 auto;
margin-top: 20px;
margin-bottom: 20px;
}
<div class="container-fluid greyBck" style="margin-top: 100px;" id="about">
<div class="" style="padding-top: 50px; padding-bottom: 50px;">
<div class="row" style="width: 80%; margin-left: 10%;">
<div class="col-12 col-md-5">
Duis faucibus, magna eu sodales viverra, nunc erat ullamcorper nibh, at varius leo ipsum eleifend lorem. Nam eu consectetur odio. Curabitur dolor libero, congue luctus gravida vitae, laoreet nec dolor. Donec sagittis lobortis odio, id hendrerit nunc molestie
sagittis. Nam nec purus sapien. Nunc est purus, mattis ac magna maximus, pulvinar sodales lacus. Praesent eget pulvinar justo, in sodales arcu. Integer vel sagittis libero, id condimentum enim. Quisque sollicitudin tempus nibh pellentesque condimentum.
Curabitur in posuere sem. Nulla aliquam in turpis ut molestie. In eu quam est.
</div>
<div class="col-12 col-md-7 bioText" style="float: left;">
<h1 style="padding-bottom: 20px;">About Myself</h1>
<span class="singleAfterLine"></span>
</div>
</div>
</div>
</div>