timjphoto Posted January 24, 2021 Share Posted January 24, 2021 Site URL: http://www.timjobling.co.uk/ Hi, I've been using the forum for a while and it's been incredibly helpful whilst building my site. I was wondering if it was possible to add a 'Back to top' button that targets my mobile site only. I created one using a code block in the footer and adding the code <a href="#" class="scrollup">Back to top</a> which works perfectly, however it's not necessary to have it on my desktop site and I don't particularly like how it looks (I have removed it for the time being). Is there a way of using a similar code the only shows on the mobile site, or is this something that can't be done. Any help help would be much appreciated. Thanks in advance, Tim. Site URL: www.timjobling.co.uk Link to comment
timjphoto Posted January 24, 2021 Author Share Posted January 24, 2021 (edited) Solved: I added the original code in the footer: <a href="#" class="scrollup">Back to top</a> Then hid it from the desktop view using the code: @media only screen and (min-width: 640px) { #block-yui_3_17_2_1_1611505021315_44741 { display: none; } } Edited January 24, 2021 by timjphoto Link to comment
tuanphan Posted January 31, 2021 Share Posted January 31, 2021 You can also replace block id with a.scrollup So you won't need to find block id Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment