MAC1 Posted December 11, 2023 Share Posted December 11, 2023 Hi, Wesbite: https://ellipse-teal-dl5w.squarespace.com/ Pass: 04 I'd like to have a custom button like this: and a hover state like this: Button on the home page that needs css: What css code would I need? Would I use a image block or a button block? and customise it with css? Thanks Link to comment
Solution tuanphan Posted December 13, 2023 Solution Share Posted December 13, 2023 Add this code to Website Tools (under Not Linked) > Custom CSS to add hover image div#block-yui_3_17_2_1_1701422267607_2792:hover img { content: url(https://content.invisioncic.com/p289038/monthly_2023_12/BUTTON-hov.png.391c1b7588c1a9fd61cd83034b4b94e6.png); } MAC1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
MAC1 Posted December 13, 2023 Author Share Posted December 13, 2023 Thank you works perfectly, looks great! tuanphan 1 Link to comment
urbnthstl24 Posted December 28, 2023 Share Posted December 28, 2023 how would i accomplish this for ALL button on a website? no need for a hover state change. none of the code i found elsewhere has worked. this is the CSS i currently have: .sqs-block-button-element--large{ background-image: url('https://static1.squarespace.com/static/6581ea8652cb8456724660cf/t/658ddec876f305615da42421/1703796429005/brushstroke-gold-1800x690px.png'); background-color: transparent!important; background-size: contain!important; background-position: center; background-repeat: no-repeat!important} i can tell i'm targeting the button because it goes transparent, but my image (uploaded into SquareSpace) won't show at all. Link to comment
tuanphan Posted December 30, 2023 Share Posted December 30, 2023 On 12/29/2023 at 4:38 AM, urbnthstl24 said: how would i accomplish this for ALL button on a website? no need for a hover state change. none of the code i found elsewhere has worked. this is the CSS i currently have: .sqs-block-button-element--large{ background-image: url('https://static1.squarespace.com/static/6581ea8652cb8456724660cf/t/658ddec876f305615da42421/1703796429005/brushstroke-gold-1800x690px.png'); background-color: transparent!important; background-size: contain!important; background-position: center; background-repeat: no-repeat!important} i can tell i'm targeting the button because it goes transparent, but my image (uploaded into SquareSpace) won't show at all. Use this code [class*="-button-"] { background-image: url('https://static1.squarespace.com/static/6581ea8652cb8456724660cf/t/658ddec876f305615da42421/1703796429005/brushstroke-gold-1800x690px.png') !important; background-color: transparent !important; background-size: contain !important; background-position: center; background-repeat: no-repeat !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment