Archived topic
Hide Back to top Button on Mobile
5 replies · Started by June on April 11, 2022
Hello, I have a back to top button enable on my website but I don't want to display it on my mobile device.
How can I do this?
Hi there,
Try this:
@media (max-width: 768px) {
.generate-back-to-top {
display: none;
}
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps :)
Hi Leo, its still showing :(
The code should definitely work - however, I'm not seeing it being added.
I see if you have lots of CSS added so there could be a syntax error in the CSS before which stops this code from executing.
You can try adding my CSS to the very top of the Additional CSS field in the customizer to test.
It was definitely a syntax error. Sorry, my bad!
Thank you so much, Leo for always being so helpful :)
No problem :)