Venera Posted September 14, 2022 Share Posted September 14, 2022 (edited) Hi guys! I use this code in the footer for the "back to top". Could someone help me remove this line spacing? <a href="#top" class="t-top"><span class="arrow"></span>Back to top</a> <style> /* Back to Top */ .t-top { text-align: center; display: block; font-family: 'VeneraUtopia' !important; font-size: 1.2em; } .t-top .arrow:before { font-family: 'VeneraUtopia' !important; content: "*"; text-align: center; display: block; font-size: 2.5em; } .t-top .arrow {display:inline;} </style> Edited March 17, 2023 by Venera Link to comment
Solution Ziggy Posted September 15, 2022 Solution Share Posted September 15, 2022 Hi @Venera, try this adjustment to your code: <a href="#top" class="t-top"><span class="arrow"></span>Back to top</a> <style> /* Back to Top */ .t-top { text-align: center; display: block; font-family: 'VeneraUtopia' !important; font-size: 1.2em; } .t-top .arrow:before { font-family: 'VeneraUtopia' !important; content: "*"; text-align: center; display: block; font-size: 2.5em; line-height: 0.5em; margin-top: 0.3em; } .t-top .arrow {display:inline;} html {scroll-behavior: smooth;} </style> adjust these lines to exactly how close you want the * to the text below and the section edge above: line-height: 0.5em; margin-top: 0.3em; I also added this line to scroll smoothly back to the top instead of jumping, remove if you don't want it. Please let me know if this worked, and upvote if this was helpful! Venera 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Venera Posted September 15, 2022 Author Share Posted September 15, 2022 1 hour ago, Ziggy said: Hi @Venera, try this adjustment to your code: <a href="#top" class="t-top"><span class="arrow"></span>Back to top</a> <style> /* Back to Top */ .t-top { text-align: center; display: block; font-family: 'VeneraUtopia' !important; font-size: 1.2em; } .t-top .arrow:before { font-family: 'VeneraUtopia' !important; content: "*"; text-align: center; display: block; font-size: 2.5em; line-height: 0.5em; margin-top: 0.3em; } .t-top .arrow {display:inline;} html {scroll-behavior: smooth;} </style> adjust these lines to exactly how close you want the * to the text below and the section edge above: line-height: 0.5em; margin-top: 0.3em; I also added this line to scroll smoothly back to the top instead of jumping, remove if you don't want it. Please let me know if this worked, and upvote if this was helpful! I'm like oh wow! Thank you very much! I found this code and changed it so the smoothness was lost somewhere. Thank you so much, this is what I need! Link to comment
Ziggy Posted September 15, 2022 Share Posted September 15, 2022 26 minutes ago, Venera said: I'm like oh wow! Thank you very much! I found this code and changed it so the smoothness was lost somewhere. Thank you so much, this is what I need! @Venera Not a problem, happy to help! Could you vote up my answer? Venera 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? 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