HTML ':after' pseudo element text position change on chrome window resize

Viewed 57

I have a :after pseudo with a '+' beside a button

:after {
content: '+';
height: 3.125rem;
width: 3.125rem;
position: absolute;
right: -3.438rem;
z-index: 25;
background-color: #8f981d;
border-color: #8f981d;
text-align: center;
font-size: 2.375rem;
font-weight: 400;
line-height: 3rem;
display: inline;
vertical-align: -50%;}

In my local sever it is center align as below:

enter image description here

But after pushing to live server '+' moved bit to bottom as below:

enter image description here

But if I change the browser size even with a 1px, position of the '+' automatically adjust to center as expected. This happens in Chrome only. Please help me if anyone know the reason or know any fix for this? Thanks All!!!

0 Answers
Related