This question has already been answered:
window.onload = function() { var circle = document.querySelectorAll(".circle"); var circIn = document.querySelectorAll(".circle__inv"); var circInCnt = document.querySelectorAll(".count__hgt"); for(var i = 0;i<circle.length;i++) { circle[i].style.height = circle[i].offsetWidth + "px"; circIn[i].paddingTop = circIn[i].paddingTop - circInCnt.offsetHeight "px"; } } .circle { width: 15%; background: #900C3F; border-radius: 50%; text-align: center; font-size: 18px; margin: 0 auto; cursor: pointer; transition: 1s; } .circle__inv { width: 100%; height: 100%; padding-top: 50%; } The text should be in the middle vertically and horizontally, insufficient vertical positioning accuracy (an error in my code). Most likely it is in js (mixed up values, objects). Please help, it is very important
