Hello I have a partial bottom yellow line under h1 text but I cant figure out how to put it in the middle. I am able to put this is in left but align center or margin auto is not working.
I tried playing around with this for about an hour and I cant figure this out. I saw some people giving the h1 span a specific width in pixels but Im trying to avoid doing this because I plan on making the text smaller for ipad and mobile.
.l-heading {
font-weight: bold;
font-size: 4rem;
margin-bottom: 0.75rem;
line-height: 1.1;
}
.container {
max-width: 1404px;
margin: auto;
padding: 0 2rem;
overflow: hidden;
}
.text-center {
text-align: center;
}
#meet-our-team .container h1 span {
position: relative;
}
#meet-our-team .container h1 span::after {
content: '';
width: 40%;
height: 4px;
background: red;
position: absolute;
bottom: -4px;
left: 0;
}
<section id="meet-our-team" class="bg-black">
<div class="container">
<h1 class="l-heading text-center py-2">
<span>Meet The Owner</span>
</h1>
</div>
</section>