• Resolved Sinkadus

    (@niwin)


    Hi

    My site has a fixed header, ‘always on top’. This make it so that the paginated individual questions get partly hidden, because they always scroll up to align with the top of the screen (underneath the header).

    Is there a way to change how much the scroll up, or add a padding or margin so the header will not hide the questions? Maybe som css-wizardry?

    Thanks for listening!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Hi Sinkadus,
    you can try to enable the “Enable Legacy Scroll” option from the HD Quiz -> About / Options page.

    Thread Starter Sinkadus

    (@niwin)

    Tried it, same result…

    Plugin Author Harmonic Design

    (@harmonic_design)

    Leave the legacy feature on – it’ll be needed.

    Because your site is doing a lot of custom stuff in regards to both page scrolling and the sticky header – getting this to work for you might be quite the challenge.

    Try editing the plugin directly hd-quiz/includes/js/hdq_script.js

    The first change it so line 850. Change the 50 to 300. This will change the delay for when the scroll happens and should help compensate for the off timing your site is causing.

    Next is line 819 where you will see the number 40. This is the offset to help account for people like you with sticky headers – but yours is a BIG one, so we will need to increase this number. Your header height is 106px, so change 40 to 156.

    Once done, remember to clear your cache (both site cache if you are using, and browser cache) and let me know if this makes any difference.

    Let me know if you need help with any of the above.

    Thread Starter Sinkadus

    (@niwin)

    Thanks for the effort, i found the file and did the changes. However – there is no difference… I have emptied the cache in 3 different browsers, so not sure why nothing happens…

    Plugin Author Harmonic Design

    (@harmonic_design)

    I can see that you did the changes; as I warned, getting this to work for you might be quite the challenge!

    So first, some background on what is causing the issue.

    So there are several issues with your site that are completely out of the control HD Quiz. These issues are CSS related to your theme / other plugins.

    The way that the auto-scroll works is that HD Quiz needs to figure out not just where on the page it should scroll to, but what is the element that should be scrolled. Because of the way your site is coded, it’s basically impossible to calculate this.

    We are using the Enable Legacy Scroll feature for your site which gives us more control over what, when, and where the scrolls appear. However, by default, this feature is not enabled because we allow the browser to figure this out itself. So the fact that even the browser itself is unable to accurately figure out where and what to scroll points towards there being some serious issue with your site layout and CSS. Unfortunately, debugging your site to track down these issues is far out of scope for HD Quiz support, but luckily we can still do some modifications to the plugin directly to compensate for this.

    To make this easier for you, I have made the modifications myself to the hd-quiz/includes/js/hdq_script.js so that you can just copy / paste the entire thing. I’m fairly certain this will work for you, but if it doesn’t, it should also console.log some extra information that we can use to help us moving forward. Here is the modified code: https://pastebin.com/raw/mr1Bj7CU

    Please let me know if the above makes any difference and I’ll take a further look.

    Thread Starter Sinkadus

    (@niwin)

    Thanks, this works!

    Its just the issue with the final scroll to the results, that still ends upp partly hidden below the fixed header. Would a small correction of something fix this too?

    Plugin Author Harmonic Design

    (@harmonic_design)

    Great; glad it worked!

    Here is the same thing, but should work for the results as well.

    https://pastebin.com/raw/eU33jgPv

    Thread Starter Sinkadus

    (@niwin)

    Thanks, I updated and emptied the cache. But it doesn’t seem to work…

    General Q: are you planning to add a offset feature in the plugin, so the user can change depending of needs?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Top margin for paginated questions’ is closed to new replies.