How to create sliding underline on hover for button blocks
This css tutorial will work on the button block and the final effect on hover is an underline below the button text. This css only works on the button block and will not work on other blocks with buttons e,g Image Blocks and Newsletter Blocks.
Complexity: Easy
Step 1
Set the button background colour to transparent for the effect to work. Simply go to the Design > Site styles > Colours to archieve this.
Step 2
Simply copy the css below, Then head to to ‘Design’ and then ‘Custom CSS’ and paste the code.
Step 3
To have the effect from right to left use this code.
Step 4
As there is no cursor on hover on mobile, we have made the text not visible on mobile devices. However, we still need to make the mobile view look presentable.
If you have any questions or need any help with your Squarespace website design, you can book a 1:1 consultation.
All work in this guide is provided ?“AS IS”. Other than as provided in this agreement, this guide makes no other warranties, express or implied, and hereby disclaims all implied warranties, including any warranty of fitness for a particular purpose.
If you require professional advice, we recommend that you purchase the services of a developer.