[Resolved] Add border and shadow to WP Show posts

Home Forums Support [Resolved] Add border and shadow to WP Show posts

Home Forums Support Add border and shadow to WP Show posts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2073098
    Henk

    Hi,

    I’m using WP Show post to show the last three post on the front page.
    To make them more appealig I tried to add some CSS to them, but somehow I miss something.

    Can you find what I’m missing? Below is a simple CSS statement, the end result contains shadow, ease-in, -out, etc.
    If you have an example on this forum, that would also be fine.

    article.wp-show-posts-single {
        border: 2px;
        border-color: grey;
    
    }

    Thanks, Henk.

    #2073299
    David
    Staff
    Customer Support

    Hi there,

    you could do:

    /* add some padding a border and radius */
    .wp-show-posts-columns .wp-show-posts-inner {
        padding: 15px;
        border: 1px solid #ccc;
        border-radius: 6px;
        transition: all 0.3s ease-in;
    }
    
    /* offset padding around image so it fills width of post */
    .wp-show-posts-columns .wp-show-posts-single .wp-show-posts-image {
        margin-left: -15px;
        width: calc( 100% + 30px );
    }
    
    /* add hover effect */
    .wp-show-posts-columns .wp-show-posts-inner:hover {
        box-shadow: 0 6px 6px 2px rgba(0,0,0,0.2);
    }
    #2073499
    Henk

    Nice David!
    I’m learning more and more nice things about CSS ๐Ÿ™‚

    #2073508
    Henk

    Just a question, more off-topic.
    I can find most things by using Inspect Element in Chrome to find the right selectors.
    But is there something of a library of CSS examples especially for GP?

    This gives me some more examples to learn.

    Thanks Henk.

    #2073631
    Leo
    Staff
    Customer Support

    But is there something of a library of CSS examples especially for GP?

    Unfortunately not as there are simply too many selectors to list out.

    Using the browser inspector tool is the best way to go.

    Our support team is always happy to help with identifying any theme CSS selectors in this forum as well ๐Ÿ™‚

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