Okay
  Public Ticket #3444708
Color on Hover
Closed

Comments

  •  1
    bryguy86 started the conversation

    I have been trying extensively to make my Fancy Box images be black and white and hover on color. Ive tried numerous different CSS code, plugins, etc and nothing. Could you please advise how I can do this? 
    I have both the B&W and color versions of these images if needed. THANK YOU!

  •  8,939
    Tahir replied

    Hey bryguy86 ,

    You can add in colored images and make them grayscale using some CSS. 

    Add this into the Custom CSS box in your Salient Theme Options panel (We write all Custom CSS in the Live Browser to ensure accuracy. If you cannot see any changes, make sure there is no red cross in the Custom CSS Box as any syntax error would cause all CSS under that line of code to not show up on the Frontend):

    .nectar-fancy-box[data-style="image_above_text_underline"].aspect-3-2:hover .box-bg {
        filter: invert(1);
    }
    .nectar-fancy-box[data-style="image_above_text_underline"].aspect-3-2:hover .box-bg {
        filter: grayscale(1);
    }

    Thanks



    ThemeNectar Support Team 

  •  1
    bryguy86 replied

    Thanks for the response and help! Almost works- it's the opposite of what I'm going for.

    Hoping to have it static black and white, then color on hover.

  •  8,939
    Tahir replied

    Hey Again,

    In that case you will have to put in colored image and make them grayscale using the CSS below:

    .nectar-fancy-box[data-style="image_above_text_underline"].aspect-3-2 .box-bg {
        filter: grayscale(1);
    }
    .nectar-fancy-box[data-style="image_above_text_underline"].aspect-3-2:hover .box-bg {
        filter: grayscale(0);
    }
    

    Thanks.


    ThemeNectar Support Team 

  •  1
    bryguy86 replied

    This worked perfect, thank you!!

  • Interritor replied

    Hello i have similar problem but with the icon.
    I'm using a custom icon and I like to switch the color to white when hover on. 

    For icons from the library, it already works, but i cloud not find a way to get it to work for costume icon images. It still stays on the i con color.

    I hope you cloud help me. Thank you so much in advance.Andre


  •  1,921
    Judith replied

    Hello Interritor .

    Thanks for writing to us.

    Please share your website URL so that we can check this out and assist you better.

    Looking forward to hearing from you.

  • Interritor replied

    Hello Judtih,

    wow, thanks for your fast replay.
    Here is the URL :https://naturkosmetik-karl.de/

    I'm talking about the first fancy box (second row). I'm using an individual icon with a color and i like it to behave as the other once (switch to white when hover) who are from the library.  
    It's also not centered, for some reason.

    Thank you very mutch (I'm desperate).



    Attached files:  Screenshot 2023-09-21 194728.png

  •  1,921
    Judith replied

    Hi there,

    Please try this CSS:

    .full-width-section img {
        display: initial;
    } .nectar-fancy-box .fancy-box-custom-icon, .nectar-flickity:not(.masonry) .flickity-slider .cell .nectar-fancy-box .fancy-box-custom-icon {
        filter: brightness(1.5);
    }

    I hope this helps.

    Please feel free to open a new ticket in case of any other queries.

  • Interritor replied

    Hey Judith,

    thank you. It wokrs kind of. Problem now is that the image color is whte all the time white. I just want it to switch to white when i´m hovering over the box. That would be perfekt.

    Ist that possible to archive?

    Thanks,

    Andre

  •  1,921
    Judith replied

    Hi there,

    Thanks for writing back.

    Looks like you made some changes here, it's not the same layout and behavior as before:

    8684465690.png

    Do you want these changes for all the icons?

    Please let us know.