rpzn6171 Posted June 3, 2023 Posted June 3, 2023 (edited) I added some code to the page I shared in the site URL and when the site is in editing mode it works perfectly but once I published the page, the images began to expand beyond the block even though it should be hidden. Any help would be greatly appreciated. Here is the code: <style>.fluid-image-container.sqs-image-content:hover{transform: scale(1.1); transition: .4s;} img{transform: scale(1); transition: .4s;} .fluid-image-container.sqs-image-content{overflow:hidden!important;} .fluid-image-container.sqs-image-content:hover{background:blue!important;opacity:0.5; transition: .4s} .fluid-image-container.sqs-image-content {opacity:1; transition: .4s} a { text-decoration: none !important; }</style> Edited June 3, 2023 by rpzn6171
creedon Posted June 3, 2023 Posted June 3, 2023 I don't see a site URL. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
rpzn6171 Posted June 3, 2023 Author Posted June 3, 2023 (edited) @creedon Yeah I'm not sure why it isn't showing up. Here it is: https://www.thesqinstitute.com/interactive-labs Edited June 3, 2023 by rpzn6171
creedon Posted June 3, 2023 Posted June 3, 2023 I suspect that the issue you are seeing has to do with the editor is adding extra elements to the html. Those elements are providing a container so the images don't scale where you don't want them to. Try the following. <style> .sqs-block-image .design-layout-fluid .fluid-image-container .content-fill img { transition : 0.4s; } .sqs-block-image:hover .design-layout-fluid .fluid-image-container .content-fill img { opacity : 0.5; transform : scale( 1.1 ); } </style> As far as I could tell the blue color was having no effect. Keeping in mind that I was viewing your site from an outside perspective. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
rpzn6171 Posted June 4, 2023 Author Posted June 4, 2023 Hi @creedon , so I added the code and it didn't do anything for the expanding of the images but it did make the color blue (which I then changed to black). Any other thoughts why this might be? <style>.fluid-image-container.sqs-image-content:hover{transform: scale(1.1); transition: .4s;} img{transform: scale(1); transition: .4s;} .fluid-image-container.sqs-image-content{overflow:hidden!important;} .fluid-image-container.sqs-image-content:hover{background:black!important;opacity:0.5; transition: .4s} .fluid-image-container.sqs-image-content {opacity:1; transition: .4s} a { text-decoration: none !important; }</style> <style> .sqs-block-image .design-layout-fluid .fluid-image-container .content-fill img { transition : 0.4s; } .sqs-block-image:hover .design-layout-fluid .fluid-image-container .content-fill img { opacity : 0.5; transform : scale( 1.1 ); } </style> Thanks for your help!
Solution creedon Posted June 4, 2023 Solution Posted June 4, 2023 Quote so I added the code and it didn't do anything for the expanding of the images but it did make the color blue Did you remove, make a copy somewhere, your version of the effect when you installed my code? scale effect.mp4 tuanphan 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
rpzn6171 Posted June 4, 2023 Author Posted June 4, 2023 @creedon That worked! Thank you so much! Just curious, do you know of a simple code that would allow the hover effect to remain even as the mouse hovers over the text?
creedon Posted June 5, 2023 Posted June 5, 2023 (edited) Quote Just curious, do you know of a simple code that would allow the hover effect to remain even as the mouse hovers over the text? Hmmm. As far as I can tell, Fluid Engine makes this much more difficult than would have been with Classic Editor. In FE the image block and text block are separate elements and you have no reliable way to relate to the two elements to each other. With CE the image block had various styles such as overlay, so the image and text were one unit that could be addresses with CSS. I'm not really a fan of FE for most applications but perhaps someone more familiar with it can offer some help. Edited June 5, 2023 by creedon Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment