Jump to content

Reduce the distance between lines

Go to solution Solved by Ziggy,

Recommended Posts

Site URL: https://www.veneramor.com/

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>

Screenshot_1.png

Link to comment
  • Solution

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!

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment
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
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?

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.