Im trying to add margin top to my titles that contain a css pseudo element.
when trying to add my margin-top the pseudo element (line above text) nests within my margin. how can I add the margin on top of it.
CSS
.line-top{
font-size: 32px;
font-weight: 200;
padding: 30px 0;
letter-spacing: 2px;
margin-top:5rem;
&::before{
position: absolute;
display: inline-block;
content: '';
background:
linear-gradient(
to left,
$orange 0,
$orange 50.00%,
$teal 50.00%,
$teal )no-repeat;
height: 4px;
width: 190px;
top: 15px;
}
}
HTML
<h3 class="line-top">ME Text Title </h3>
IMAGE