A user seeks help modifying a contact form confirmation button on their Shopify store (seraneeva.com). They want to reduce the button’s horizontal width and apply the same scaling animation effect used on other site buttons.
Original Animation Code:
The existing buttons use a CSS animation with:
A pseudo-element (:before) that scales from 0 to full width
Transform properties with cubic-bezier timing
0.8s transition duration
Scale effect on hover (0.95, 0.9)
Proposed Solutions:
Solution 1: Add padding: 10px 20px to .btn and modify the :before pseudo-element with width transitions
Solution 2: Target the specific button with button.pop-up-btn:before selector, implementing:
Background color variable
Absolute positioning (top: 50%, left: 50%)
Transform with translate and scale properties
Same 0.8s cubic-bezier transition
Scale effect (0.95, 0.9) on hover
Both solutions recommend adding CSS to the theme’s stylesheet (base.css, theme.css, or theme.scss.liquid) via Shopify Admin.
Status: Multiple solutions provided; awaiting user confirmation on which approach worked.
Summarized with AI on November 9.
AI used: claude-sonnet-4-5-20250929.
After a user hits send on the contact form a message pops up. Pic for reference. How can I make the button smaller horizontally and add the same animation effect as all other buttons on the site.
Hi @flammagreg
To make the button horizontally smaller and add the same animation effect as all the other buttons on the website. You can refer to the following CSS style settings: