oli_drone Posted March 4, 2020 Share Posted March 4, 2020 hello - new to squarespace and haven't coded since like 2003 and this is very hard for me to put into words, so please bear with me. my goal is to add css code to create a hover state with images. very simple. when i create the 1st block everything works fine. i add the 2nd css block using the same code structure, update the two image urls for hover states and save. every time i add a new block all the previous blocks change to the newest one created even though they are all point to their own .png urls. this is the code i'm using: https://www.tutorialrepublic.com/codelab.php?topic=faq&file=changing-image-on-hover-with-css any help would be greatly appreciated! Link to comment
tuanphan Posted March 5, 2020 Share Posted March 5, 2020 Can you share link to your site? to check your code 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
oli_drone Posted March 5, 2020 Author Share Posted March 5, 2020 7 hours ago, tuanphan said: Can you share link to your site? to check your code hello - im working on this in staging, but the site is dronebase.com if thats helpful. heres the code im working with: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Change Image on Hover in CSS</title> <style> .card { width: 432px; height: 102px; background: url("https://images.squarespace-cdn.com/content/5afa06f5506fbea240a330a7/1583356423440-GJPLOGXJ6HM4O5CWHAEY/ins-off.png?content-type=image%2Fpng") no-repeat; margin: 0px; } .card:hover { background: url("https://images.squarespace-cdn.com/content/5afa06f5506fbea240a330a7/1583356585413-YAP8FGEZZVFRDNU1MV6F/ins-on.png?content-type=image%2Fpng") no-repeat; } </style> </head> <body> <div class="card"></div> </body> </html> do i need to assign each block with its div class? <div class="card" id="yui_3_17_2_1_1583444366596_51285"></div> Link to comment
tuanphan Posted March 10, 2020 Share Posted March 10, 2020 Have you fixed yet? if no, can you share link to pages that contains css blocks? 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
Archived
This topic is now archived and is closed to further replies.