Jump to content

Issues with Back to Top scrolling button

Go to solution Solved by Beyondspace,

Recommended Posts

Site URL: http://www.dandelion-drum-w9ws.squarespace.com

I entered code to get my "back-to-top button in place, and there is a weird overlap, rather than the image laying perfectly over the button. 

Here's the css I have entered:

#back-to-top{
  height:45px;
  width:45px;
  position:fixed;
  padding:9px;
  bottom:0;
  right:0;
  z-index:99;
  
  border-radius:100%;
  box-shadow: 0px 0px 5px #ccc;
  margin:20px;
  background:white;
}

html{
  scroll-behavior:smooth;
}

And this is the code I've injected in the header:

<div id="scroll-here"></div>
<a id="back-to-top" href="#scroll-here">
  <img src="https://static1.squarespace.com/static/61f41cf600dec14c7c38f90b/t/62542758a81ed506e7f2b164/1649682264925/arrow-up-circle-52_989ac618-1138-4d30-9b85-aee2cc99139e.png">
</a>

Screen Shot 2022-04-11 at 8.18.04 PM.png

Link to comment
  • Solution
On 4/12/2022 at 7:22 AM, xjennix937 said:

Site URL: http://www.dandelion-drum-w9ws.squarespace.com

I entered code to get my "back-to-top button in place, and there is a weird overlap, rather than the image laying perfectly over the button. 

Here's the css I have entered:

#back-to-top{
  height:45px;
  width:45px;
  position:fixed;
  padding:9px;
  bottom:0;
  right:0;
  z-index:99;
  
  border-radius:100%;
  box-shadow: 0px 0px 5px #ccc;
  margin:20px;
  background:white;
}

html{
  scroll-behavior:smooth;
}

And this is the code I've injected in the header:

<div id="scroll-here"></div>
<a id="back-to-top" href="#scroll-here">
  <img src="https://static1.squarespace.com/static/61f41cf600dec14c7c38f90b/t/62542758a81ed506e7f2b164/1649682264925/arrow-up-circle-52_989ac618-1138-4d30-9b85-aee2cc99139e.png">
</a>

Screen Shot 2022-04-11 at 8.18.04 PM.png

Try

#back-to-top {
  display: flex;
}

Let me know how it goes on your site

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.1e11a09c535225d432a37479dd675192.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 1 month later...

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.