Jump to content

"add to cart" button moves when clicked on

Recommended Posts

I have a button "add to cart" that I had initially coded to read at 70% of its width, but when someone would click on it, it would jump sideways. I removed that code, but now when someone clicks on it, it jumps up a little bit. Does anyone know how to solve this? Has anyone else had problems/found workarounds for buttons moving after they have been clicked on?

Link to comment

Can you share the website URL and point to an example?

There are numerous reasons that an element might move when clicked or hovered on.

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) 

 Did I help? Buy me a coffee?

Link to comment
  • 2 weeks later...

That one pixel movement is most likely because of a font size change or line height change when the text changes from add to cart to adding.

Does it still do this if you remove all of the CSS and code from your website?

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) 

 Did I help? Buy me a coffee?

Link to comment
8 hours ago, WillaOCC said:

Is there a way to fix this with code?

I think you need to fix the code rather than add more code. Fixing code can be tricky, but identifying which part is causing the problem would be a first step.

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) 

 Did I help? 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.