So im trying to create a simple line on either side of a H1 element to create some style. When I change the top: 50%; style (51% and back to 50%) the line will be in the right place, but when I save the code in Atom, the lines will revert back as if there was no top style whatsoever. Any ideas?
.thankyou {
display: flex;
justify-content: center;
align-items: center;
height: 10rem;
font-family: var(--ff2);
font-size: 5rem;
font-style: italic;
}
.thankyou h1::before {
content: "";
background-color: var(--red);
display: block;
left: -30rem;
bottom: 50%;
width: 80%;
height: 0.2rem;
position: relative;
z-index: 1;
}
.thankyou h1::after {
content: "";
background-color: var(--red);
display: block;
right: -30rem;
top: 50% !important;
width: 80%;
height: 0.2rem;
position: relative;
z-index: 1;
}
<section class="thankyou">
<h1>Thank You</h1>
</section>
As you can see, the line on the left has had the position changed from 50% to 51% and back to 50% which puts it in the right postion.