Adding the following code to your theme’s functions.php
will help solve the timer position issue (but not your other issues), but please note that I strongly recommend also doing the following.
The timer begins once the page and HD Quiz have loaded. Since your timer is so short (only 30 seconds) and you have so much content for the user to read before they even get to the quiz, I recommend adding the quiz to its own page without that extra content / intro text, then linking to that quiz.
So, on the current page, keep everything where it is, except in place of where the quiz currently is, just have a button/link that says “Start Quiz” or something. This button will then link to a new page that has the quiz.
function hdq_dguin111_timer()
{ ?>
<script>
jQuery(document).ready(function() {
const hdqtimer = document.getElementsByClassName("hdq_timer")[0];
hdqtimer.style.zIndex = "999999";
hdqtimer.style.left = 5 + "px";
jQuery(window).scroll(function(e){
if(window.innerWidth > 800){
hdqtimer.style.top = (window.innerHeight / 2) + jQuery(this).scrollTop() - 270 + "px";
} else {
hdqtimer.style.top = jQuery(this).scrollTop() - 270 + "px";
}
})
});
</script>
<?php
}
add_action("hdq_after", "hdq_dguin111_timer");
That code will add some custom JavaScript to pages that have a quiz on them. This code is specific to your theme. It first calculates what the width of your site is (so that it works across every screensize), taking into account the overflow you have (your site has lots and lots of overflow. It’s technically twice as wide as it appears!), and then does the same for height + current scroll position. Then every time the page scrolls, the code recalculates the new position and places the timer where it works best.