I'm trying to figure out how I can have an effect of a thick line behind the heading. You can see what I mean by running the code below. It works, however, the problem is that if a heading is too long and is on multiple lines this line is only present at the bottom of the last line of the heading. My implementation is not optimal, and I'm trying to figure out how to do it properly. Thanks.
CLarification: if my header is 2 lines or more, i need that underline to be under both lines.
.contentWrapper{
display: inline-block;
position: relative;
margin: 0 auto;
}
.heading{
padding: 0 10px;
margin: 0 auto;
font-weight: 400;
font-size: 2.8rem;
}
.underline{
width: 100%;
background-color: orange;
height: 12px;
position: absolute;
bottom: 4px;
z-index: -1;
}
<div class="contentWrapper">
<h1 class="heading">Some Heading</h1>
<span class="underline"></span>
</div>