Treehouse: Grow your CSS skills. Land your dream job.

[Solved] Darken image gallery when hovered, but not if different div is hovered

  • # June 18, 2015 at 4:03 am

    Hi guys, I’m new to the forums, but I’ve harnessed the knowledge on this site for quite some time now.

    So I have the following problem. On my site I’ve got a collection of thumbnails which open in lightbox on click and enlarge on hover.

    I want to achieve the following: I want all of the thumbnails to darken when I hover their container and enlarge and brighten single pics on hover.
    I have achieved the enlarge and brighten part on the individual images but unfortunately this makes my thumbnail collection a bit dark.

    For demonstration purposes I have used pictures of my fabulous cat. So far it looks a little something like this..

    So is there a way to display all the images normally (without darkening them) when their container is not hovered but to darken all the images when one is hovered but the one that is hovered?

    Help would be much appreciated.
    Greetings from Germany
    derelektrischemoench

    # June 18, 2015 at 4:32 am

    Not exactly…you can darken all the images when the div is hovered and then highlight any image that is hovered.

    It’s not quite the same but in general it works similarly.

    I’ve removed the ‘grow’ part in the demo but I’m sure that you can work that part out.

    # June 18, 2015 at 6:34 am

    Aw yiss, this worked perfectly.

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.