I have a Grid template and I am using a countdown timer with React, that returns how many seconds are left. Unfortunately, I need to use it in a different child div, because there is a function I am using. I can edit it but it would take lots of refactoring and testing everything again, so I would prefer not to.
Here is my .css code:
.countdown{
position: absolute;
top: 11.4%;
left: 70.4%;
font-size: 14px;
color: red;
}
When the screen is smaller, it is positioned as I want to but as the width gets bigger, the element goes more to the left (so it doesn't work with percentage). And the problem is that if I want a media-query it would take almost every single width resolution option. So is there another way to position the element with the absolute attribute and it doesn't get too much moved from its position in the different resolution?