[Resolved] Distance Headline / featured image

Home Forums Support [Resolved] Distance Headline / featured image

Home Forums Support Distance Headline / featured image

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #450931
    Bert

    Hi Tom,
    hi Leo,

    since a couple of days I am trying to lower the distance between the featured images on the frontpage (separate containers, no masonry) and the headline of the article. Can’t figure it out ๐Ÿ˜‰

    Also I dind’t find any suggestion in the forum, so I thought I ask you guys.

    I am sure for you it’s a simple thing, right?

    Thanks
    Bert

    #450947
    Leo
    Staff
    Customer Support

    Hi there,

    Assuming your featured image is on top of the post title, try this CSS:

    .post-image-above-header .inside-article .post-image, 
    .post-image-above-header .inside-article .featured-image {
        margin-bottom: 1em;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Can you link me to the site if it doesn’t work?

    #451265
    Bert

    Thank you Leo,

    but that was not working.

    I did a screenshot for you so that you can see what my challange looks like:

    So here is the Frontpage of an website with all the new articles:

    View post on imgur.com

    You can see the huge space beween the headline and the featured image.

    What I try is to make it look like this:

    View post on imgur.com

    As I mentioned the frontpage has separate containers and no masonry.

    Any idea?

    Thanks Leo

    #451485
    Tom
    Lead Developer
    Lead Developer

    Did you adjust the 1em value to something smaller? If so, can you link us to the page so we can take a look?

    #451803
    Bert

    Thank you Tom.

    Yes, I even tried 10px and 0px but it made no difference.

    I am going to send you the url by mail.

    Cheers,
    Bert

    #451804
    Leo
    Staff
    Customer Support

    You can edit the original post and use the private URL field that only Tom and myself can see.

    #451806
    Leo
    Staff
    Customer Support

    My CSS above should work but I don’t see them being added.

    Maybe try clearing WP Super Cache.

    #451807
    Bert

    Thanks Leo,

    I just edited the url field and saw that the url was already included?

    Anyway, now it is available.

    Cheers,
    bert

    #451811
    Leo
    Staff
    Customer Support
    #451828
    Bert

    Hi Leo,

    so I included the this lines into my styles.css

    .post-image-above-header .inside-article .post-image, 
    .post-image-above-header .inside-article .featured-image {
        margin-bottom: 1px;
    }
    

    I cleared wp cache and now look for your self…

    Hmm…

    #451838
    Leo
    Staff
    Customer Support

    Now I see it but it’s being overwritten.

    Try this instead:

    body.post-image-above-header .inside-article .post-image, 
    body.post-image-above-header .inside-article .featured-image {
        margin-bottom: 1px;
    }
    #451845
    Bert

    What can I say….

    THANK’s A MILLION!!!

    This snippet worked perfectly :))

    Thank you very much Leo for helping me out

    #452044
    Leo
    Staff
    Customer Support

    No problem!

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