• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

centred featured image

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › centred featured image

This topic is: not resolved

Tagged: centre aligned, css, featured image, generate

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 11 months ago by Tony @ AlphaBlossom.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 30, 2014 at 2:29 pm #97520
    tom martin
    Member

    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
    March 31, 2014 at 12:23 pm #97715
    Tony @ AlphaBlossom
    Member

    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


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble