Jump to content

Darken Image blocks on hover in Fluid Engine CSS

Recommended Posts

Site URL: https://www.danieljoseph.com.au/films

Hey there,

I am having trouble with adding a simple hover effect to my image blocks in the new Fluid Engine.

Essentially I am trying to recreate this: http://www.ladybaguette.com/

Currently I have managed to Frankenstein some code which isolates each block individually and achieves the slight fade to black instead of the white background. Although for some reason I can't figure out why my ease transition CSS isn't working.

My Code:
#block-b1dfc7170d9088ca974b:hover .content-fill:after {
   content: "";
    position: absolute;
    background-color: rgba(0,0,0,0.5);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    transition: all .3s;
}
#block-b1dfc7170d9088ca974b:hover .content-fill:after {
    opacity: .3;
    transition: all .3s;
}
 

^^ This is then replicated with the new block ID for the other images

Another problem is that the fade animation will not happen when the cursor is over the text block which is on-top of the image.

Any help in order to fix this would be much appreciated!!

Link to comment
29 minutes ago, Daniel_Joseph said:

Site URL: https://www.danieljoseph.com.au/films

Hey there,

I am having trouble with adding a simple hover effect to my image blocks in the new Fluid Engine.

Essentially I am trying to recreate this: http://www.ladybaguette.com/

Currently I have managed to Frankenstein some code which isolates each block individually and achieves the slight fade to black instead of the white background. Although for some reason I can't figure out why my ease transition CSS isn't working.

My Code:
#block-b1dfc7170d9088ca974b:hover .content-fill:after {
   content: "";
    position: absolute;
    background-color: rgba(0,0,0,0.5);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    transition: all .3s;
}
#block-b1dfc7170d9088ca974b:hover .content-fill:after {
    opacity: .3;
    transition: all .3s;
}
 

^^ This is then replicated with the new block ID for the other images

Another problem is that the fade animation will not happen when the cursor is over the text block which is on-top of the image.

Any help in order to fix this would be much appreciated!!

I try the following code and it seems work properly

#block-b1dfc7170d9088ca974b .content-fill:after {
  content:'';
  opacity: 0;
  position: absolute;
  background-color: rgba(0,0,0,.5);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  transition: all 1s;
}
#block-b1dfc7170d9088ca974b:hover .content-fill:after {
  opacity: .3;
  transition: all 1s;
}

Support me by pressing 👍 if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

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

Thank you so much! This is working.

It's a small thing, but is there anyway to maintain the hover effect when the cursor is over the text block? Just something I'm noticing that is happening on mine and not the referenced page.

And on an unrelated note, at the bottom of the page where the section meets the footer, there is this odd white gap. Is there any reason as to why the image and the footer isn't lining up perfectly? (see attached)

Screen Shot 2022-10-04 at 10.42.51 am.png

Screen Shot 2022-10-04 at 10.45.50 am.png

Link to comment
On 10/4/2022 at 7:46 AM, Daniel_Joseph said:

Thank you so much! This is working.

It's a small thing, but is there anyway to maintain the hover effect when the cursor is over the text block? Just something I'm noticing that is happening on mine and not the referenced page.

And on an unrelated note, at the bottom of the page where the section meets the footer, there is this odd white gap. Is there any reason as to why the image and the footer isn't lining up perfectly? (see attached)

Screen Shot 2022-10-04 at 10.42.51 am.png

Screen Shot 2022-10-04 at 10.45.50 am.png

#1. Add this code under

.fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after {
  opacity: .3;
  transition: all 1s;
}

#2. It is a bug..

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
17 hours ago, tuanphan said:

#1. Add this code under

.fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after {
  opacity: .3;
  transition: all 1s;
}

#2. It is a bug..

#1. This doesn't seem to be working for me? I understand that this line of code should only be working for that block ID but it doesn't darken over the text still. Am I doing something wrong (attached)

#2. Shame about the bug... it's annoying.

 

Screen Shot 2022-10-07 at 12.45.51 pm.png

Link to comment
On 10/7/2022 at 9:46 AM, Daniel_Joseph said:

#1. This doesn't seem to be working for me? I understand that this line of code should only be working for that block ID but it doesn't darken over the text still. Am I doing something wrong (attached)

#2. Shame about the bug... it's annoying.

 

Screen Shot 2022-10-07 at 12.45.51 pm.png

Try this new code

.fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after {
  opacity: .3;
  transition: all 1s;
    background-color: rgba(0,0,0,.5) !important;
}
.fe-63248c8d498621168046cfc9:hover * {
    cursor: pointer;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 10/8/2022 at 7:33 PM, tuanphan said:
.fe-63248c8d498621168046cfc9:hover #block-b1dfc7170d9088ca974b:hover .content-fill:after {
  opacity: .3;
  transition: all 1s;
    background-color: rgba(0,0,0,.5) !important;
}
.fe-63248c8d498621168046cfc9:hover * {
    cursor: pointer;
}

Still doesn't work for me 😕 

Link to comment
On 10/13/2022 at 6:50 PM, Daniel_Joseph said:

Still doesn't work for me 😕 

I tested & it should work. Can you send all code in CSS box after adding that code?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.