[Support request] center title and post meta when mouseover featured image

Home Forums Support [Support request] center title and post meta when mouseover featured image

Home Forums Support center title and post meta when mouseover featured image

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #776478
    Iván

    Hi, Tom!

    In my blog page (and blog categories pages) I would like to see the post title and category inside the featured image when I mouseover the image. I found some instructions here https://generatepress.com/forums/topic/mouseover-blog-efect/#post-528215

    It works, but I would like to know:

    – How can I center the title and meta in the image, horizontally and vertically?
    – How can I see the title AND the meta (categories) below the title?
    – How can I turn the image white when mouseover it?

    THANK YOU SO MUCH!!

    #776705
    Leo
    Staff
    Customer Support

    Hi there,

    Can you unlock your site so we can see what you have so far?

    #777281
    Iván

    Sorry,

    it is unlocked now!

    Thanks!

    #777323
    David
    Staff
    Customer Support

    Hi there,

    try this CSS for position entry-header and meta and performing the hover effects:

    .generate-columns .inside-article {
        display: grid;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        text-align: center;
    }
    .generate-columns-container .inside-article > * {
        grid-column: 1;
        grid-row: 1;
    }
    .generate-columns-container .inside-article > * {
        -webkit-transition: 0.35s ease;
        transition: 0.35s ease;
    }
    
    .generate-columns-container .inside-article:not(:hover) .entry-header, .generate-columns-container .inside-article:not(:hover) .entry-meta  {
        opacity: 0;
        -webkit-transition: 0.35s ease;
        transition: 0.35s ease;
    }
    
    .generate-columns-container .inside-article:hover .post-image {
        opacity: 0;
    }
    .generate-columns-container .inside-article .entry-meta {
        padding-top: 6em;
    }
    .generate-columns-container .inside-article .post-image {
        margin-bottom: 0;
    }
    #777370
    Iván

    It worked perfectly, David! You are a genius!

    Only 2 little “problems”:

    – I would like the pading between rows to be 40px, as it is between columns.
    – When the Post title has 2 lines instead of 1 (in tablet mode, for example), the tags are veeery close to the title; ¿it is possible to increase the padding between them?

    Thank you very much!

    #777415
    David
    Staff
    Customer Support

    I adjusted the code above to increase the entry-meta top padding, and removed the bottom margin from the image so row gaps should be good

    #777427
    Iván

    Thank you so much, David! Everything perfect!

    #777452
    David
    Staff
    Customer Support

    You’re welcome. Site looks great 🙂

    #874441
    Samuel

    I don’t quite get it. What can I do to make it look like this: https://baubeaver.de/ (please check below)

    #874574
    Tom
    Lead Developer
    Lead Developer

    The code David provided looks like it should work with our columns feature. Is that what you’re using?

    WPSP Pro has cards that do this now as well.

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