• 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

Center Image in Widget

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 › General Discussion › Center Image in Widget

This topic is: resolved

Tagged: widget image

  • This topic has 6 replies, 2 voices, and was last updated 12 years, 6 months ago by Maryi.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 14, 2014 at 2:46 pm #105151
    Maryi
    Member

    Hi,

    I can't figure out how to center an image in a widget on the Home page. I don't want text to wrap around the image.

    I tried adding img class=”aligncenter” but that didn't work. I can't make the image wider. I tried using the Featured Page widget but it would only allow a thumbnail image and I need my image to be bigger than that. Setting alignment to none didn't center the image.

    I have an under construction page up so please log in to view the Home page.

    http://boulderneuromovement.com/wp-admin/
    username Guest
    password VhAA29PxTXQuVK

    Thanks.

    http://boulderneuromovement.com/wp-admin/
    May 14, 2014 at 3:34 pm #105160
    essaysnark
    Participant

    Assuming you're talking about the book cover image and the "click to buy" Amazon link, you can just put this under the image:

    <br clear="all">

    For centering, you should be able to use this:

    <p style="text-align:center;"> Your text here. </p>

    Also there's no "close image" tag - this is not actually valid HTML: </img> If you want to "close" the img tag you can put a /> at the end of it.

    May 14, 2014 at 3:46 pm #105162
    Maryi
    Member

    Thanks for your quick reply!

    Here's what I did but the image still isn't centered.

    I added <p style="text-align:center;"> before the image class and src.

    I put <br clear="all"> after the image.

    I put </p> after the Amazon link.

    Did I miss something?

    Thanks.

    May 14, 2014 at 3:57 pm #105165
    essaysnark
    Participant

    Looks like you have a style defined like this:

    .textwidget img {
        float: left;
        margin-right: 5px;
    }

    That float: left is causing the problem. Delete that and you should be good.

    May 14, 2014 at 4:02 pm #105166
    essaysnark
    Participant

    Sorry - wait - that's going to mess up the other layout you've got with the little accent images. Let me look at this for a moment.

    May 14, 2014 at 4:20 pm #105167
    essaysnark
    Participant

    So the problem is that the style you have defined on the textwidget class is taking precedence on all images that you place in any textwidget. What you might need to do is define a style for use on those little flower accent images and take the float: left off of the textwidget level. I tried playing with things like the !important tag on the book class that you have and couldn't get it to work based on the current hierarchy. Sorry that I didn't have an easy answer for you! I'm no CSS whiz so maybe someone else will pop in and see the solution.

    May 15, 2014 at 12:26 pm #105352
    Maryi
    Member

    I defined a new style for the little flower and that worked. Thanks for your help essaysnark!

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ 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

© 2026 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