Daffz Posted March 30, 2021 Share Posted March 30, 2021 Hi there, Found this awesome code, which works brilliantly for buttons. I've been trying to see how this can also be achieved for the header nav button and form button, but can't seem to target the right class. Would be great to have all buttons looking the same. Thank you! // Fade Out Line Buttom - Left To Right // .sqs-block-button-element--small { position:relative; height: 60px; line-height: 60px; text-align: center; transition: 0.5s; padding: 0 20px; cursor: pointer; -webkit-transition:0.5s; } .sqs-block-button-element--small:hover { background-color: transparent !important; border-color: transparent !important; color: #000000 !important; } .sqs-block-button-element--small:hover:before{ transition-delay: .2s; } .sqs-block-button-element--small::before{ width: 0%; height:100%; z-index: 3; content:''; position: absolute; bottom:-1px; left:0; box-sizing: border-box; transition: .2s; } .sqs-block-button-element--small:hover::before { width: 100% !important; transition: .7s; } .sqs-block-button-element--small::before { border-bottom: 1px solid #000000; } Link to comment
Beyondspace Posted April 2, 2021 Share Posted April 2, 2021 On 3/30/2021 at 10:52 AM, Daffz said: Hi there, Found this awesome code, which works brilliantly for buttons. I've been trying to see how this can also be achieved for the header nav button and form button, but can't seem to target the right class. Would be great to have all buttons looking the same. Thank you! // Fade Out Line Buttom - Left To Right // .sqs-block-button-element--small { position:relative; height: 60px; line-height: 60px; text-align: center; transition: 0.5s; padding: 0 20px; cursor: pointer; -webkit-transition:0.5s; } .sqs-block-button-element--small:hover { background-color: transparent !important; border-color: transparent !important; color: #000000 !important; } .sqs-block-button-element--small:hover:before{ transition-delay: .2s; } .sqs-block-button-element--small::before{ width: 0%; height:100%; z-index: 3; content:''; position: absolute; bottom:-1px; left:0; box-sizing: border-box; transition: .2s; } .sqs-block-button-element--small:hover::before { width: 100% !important; transition: .7s; } .sqs-block-button-element--small::before { border-bottom: 1px solid #000000; } What is your site url BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.