Theme I am using: Horizon
I’m trying to have a hover effect on images in the split showcase block - when users hover over the image I want the image to darken so it’s more obvious that you can click it to then open a new link.
I tried editing the CSS file using chatgpt’s help but it did not work.
not sure what other info is needed for troubleshooting but just ask and i will try my best to provide!
That didn’t work either this is a screenshot of the theme editor with the split showcase on the right. I have it so that the image is clickable and opens to a new link.
When I inspect the image this is what is shown to be the container of the image. The entire image (Shop our Flushing store) is highlighted in blue when the cursor is on
that worked! is there a way to make it do the opposite, like “lighten” the image (if the image in the split showcase already has an overlay of 50% darker, make the hover state 0%)?
You asked for dark background And previous code was not applied dirrectly on image so can not be lighten,
But alternative, first remove previous code from Custom CSS setting.
Than in base.css, at end add
.group-block:hover .background-image-container {
filter: brightness(120%);
transition: all 0.7s;
}
and adjust value, 100% is regular, so more would lighten and less darken.
Also note, that is not a recommended way to add code, as if you upgrade that code may be overwritten. Adding to section’s Custom CSS setting in admin is preferred. But in this case filter is not supported.
So you could do this instead, if you want to keep getting updates. Create a new custom.css file in assets, make sure it is selected then click on create new file icon and enter name of the file “custom.css” and copy code there.
Unfortunately, Shopify does not accept filter there, therefore the use of opacity.
You can swap the opacity values – on a white background less opaque would look lighter.
Or, add an image overlay either dark or light and use code like this: