centred featured image

Community Forums Forums Design Tips and Tricks centred featured image

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Tony @ AlphaBlossom 3 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #97520

    tom martin
    Member
    Post count: 1

    Sorry if this is a newb question but hoping you can help

    From a previous post was some advice that i followed:

    The following can be added in style.css to make the featured images centered and the text appearing below:

    .home .post .alignleft {
    float: none;
    margin: 20px auto;
    display: block;
    }

    It is moving the featured image above the excerpt but it is not centre aligning.

    my blog is here and uses generate -http://www.faqtube.tv

    any help would be greatly appreciated

    http://www.faqtube.tv
    #97715

    Tony @ AlphaBlossom
    Participant
    Post count: 460

    Hello,

    Your top image has a margin set of -40px, with !important so it’s overriding your other rules. You can either:

    - Around line 1307 of your styles.css, change your margin for .post-image to “margin: 0 auto 30px;”
    or
    - Around line 2699 of your styles.css, change your margin for .home .post .alignleft to “margin: 20px auto !important;”

    I prefer not to use !important unless absolutely necessary, so I would prefer the first option, but changing that might affect other areas of your site so you’ll have to play around with it to see which works best.

    Also, your images are extending outside of their container, so they still are not centered. You can fix this by adding “width: 100%; height: auto;” to your css for these images (as well as the smaller images below).

    Hope that’s what you’re looking for.

    Tony


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.