Fading picture captions

  • Unknown's avatar

    How do I make the captions of each picture on my executive page fade onto the picture when the mouse rolls over?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there, give the following custom CSS a try. I don’t see any images on your Executive page, just the placeholders as if the images have been deleted.

    .wp-caption .wp-caption-text:hover {
        opacity: 0;
    }
    .wp-caption {
        position: relative;
    }
    .wp-caption .wp-caption-text {
        height: 70px;
        position: absolute;
        bottom: 0;
        width: 100%;
        transition: opacity 0.5s ease;
    }
  • Unknown's avatar

    Hey thanks, the code works but it shows captions until I scroll over and it disappears, I’m looking to do the opposite so that it doesn’t show up until you scroll over

  • Unknown's avatar

    Hi @queensihi,

    You can achieve what you’re after by setting the opacity for .wp-caption .wp-caption-text:hover to 1 and for .wp-caption .wp-caption-text to 0, which I can see you’ve done. :) If you have any further questions then we’ll be right here.

  • The topic ‘Fading picture captions’ is closed to new replies.