Site logo

[Resolved] Show Archive Post Titles on hover

Home Forums Support [Resolved] Show Archive Post Titles on hover

Home Forums Support Show Archive Post Titles on hover

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2540871
    Daniele

    Hello,
    I’m trying to achieve an effect like this: https://www.sashaonyshchenko.com/
    on my custom post archive page: https://dev.danphotostudio.com/projects/

    Using only CSS I moved the post title on the image positioning it absolutely and made an hovering effect.
    This is the code used:

    .type-projects .entry-header {
      position: absolute;
      top: 40%;
      padding: 30px;
    }
    .type-projects .inside-article img:hover {
      opacity: 0.2;
    }
    .type-projects .entry-title a {
      opacity: 1;
      pointer-events: none;
    }

    The issue I have is that when hovering the title I lose the opacity effect.
    Is there a better way to achieve it?

    thank you

    #2540917
    Fernando
    Customer Support

    Hi Daniele,

    Try this code instead:

    .type-projects .entry-header {
      position: absolute;
      top: 40%;
      padding: 30px;
        z-index: 10000;
    }
    
    .type-projects .inside-article{
        position: relative;
    }
    .type-projects .inside-article:hover .post-image::after {
        content: "";
        position: absolute;
        left:0;
        top:0;
        height:100%;
        width: 100%;
        background-color: #00000044;
    }
    .type-projects .entry-title a {
      opacity: 1;
      pointer-events: none;
    }
    #2540994
    Daniele

    Thanks Fernando!
    But I have an issue now, the featured image is not clickable: https://dev.danphotostudio.com/projects/
    I can only click the title, and that is not the best for the user experience…
    is there another way..or I have to build a custom template for this archive?

    #2541095
    David
    Staff
    Customer Support

    Hi there,

    try this CSS instead:

    .generate-columns-container .type-projects .inside-article {
        position: relative;
    }
    .generate-columns-container .type-projects .entry-title a {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        padding: 30px;
        background-color: #1b1b1bcc;
        opacity: 0;
        transition: opacity 0.3s ease-in;
    }
    .generate-columns-container .type-projects .entry-title a:hover {
        opacity: 1;
    }
    #2541136
    Daniele

    Thanks David,
    worked flawessy!

    #2541193
    David
    Staff
    Customer Support

    Glad to hear that !

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.