Archived topic
Back to top button stretched
7 replies · Started by Bernhard on October 8, 2021
Hello,
Google Adsense and Ezoic place Anchor Ads at the bottom of the page. Now the back to top button is stretched.
How can I resolve this? I would like to center it on the page.
Screenshot https://share.getcloudapp.com/nOu5zRWX
http://www.tourist-in-rom.com/en/
Hi there,
you have this CSS on your site:
.generate-back-to-top, .generate-back-to-top:visited {
border-radius: 25px;
line-height: 50px;
width: 50px;
padding-bottom:100px
}
The padding-bottom:100px is stretching the back to top, remove that.
Hi David,
until Google Adsense started with the Anchor Ads, the code was fine. I deleted now this line but I'm not sure, if this solved the problem. I purged the cache but now I see for a second the stretched button and then it turns to normal.
Here how it looks when an AD is shown. Probably you can check from your side, what you see.
Thank you.
I purged the cache but now I see for a second the stretched button and then it turns to normal.
This is likely a caching issue.
Can you disable it and try again?
I purged each cache I could find (WP Rocket, Ezoic, Cloudflare, my browser) and waited some days but the situation is not much changed.
Sometimes it looks like in my first screenshot or it looks like this for a second and becomes then small, or, as I found now, the button stays behind the anchor ad and can not be clicked screenshot
My idea would be to place the button higher so it does not interfere with the anchor ads.
I can still see the CSS being loaded by WP Rockets Critical CSS. You may need to re-generate that.
The CSS to simply move the back to top up is this:
a.generate-back-to-top {
bottom: 200px;
}
Adjust the 200px to suit your needs.
Hi David,
now it works. Thank you :)
Glad to be of help!