Support » Fixing WordPress » Center image in text widget

  • Resolved BlondeCroatian


    I would like to center the badges under my “Awesomeness” text widget in my sidebar.

    By viewing my source code, I’ve found that the widget ID is called “text-5” and the class is “widget widget_text”.. and I’ve been trying to use different variations of this code to center the images:

    #text-5 widget_text {
    text-align: center;

    I just can’t get it to work. Any ideas?

    My site is

Viewing 12 replies - 1 through 12 (of 12 total)
  • This might be a bit simplistic, but this is how I center something right there inside a text widget:

    <p style="text-align: center;">
    our e-mail address<BR>
    <a href="" title=""></a></p>

    I just tried putting <p style=”text-align: center;”> before all of the text in my text widget and then a </p> after all of the text, and nothing 🙁

    Maybe there is something different about our themes, or maybe you just need to check “Automatically add paragraphs” at the text widget if you have that option and have not already done so.



    Forum Moderator


    #text-5.widget_text { text-align: center; }


    #text-5.widget_text .textwidget { text-align: center; }

    and clear the browser cache after the changes – press ‘ctrl f5’ or ‘reload’ …

    alchymth, that did the trick (the first one)! but it also centered the title…. do you know how to make it center the items under the title and not the actual widget title?

    Moderator Andrew Nevins


    Forum moderator

    Amend Alchymyth’s code to this;

    #text-5.widget_text .textwidget {
     text-align: center;

    Andrew Nevins, thank you thank you thank you!!!!!! That worked!!!!

    I’m having the same problem and don’t know how to put this all together with the image info.

    @treespaulding – This thread is marked resolved and CSS is theme/site specific. Please start your own thread if you need help.



    Forum Moderator

    @treespaulding: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem – despite any similarity in symptoms – is likely to be completely different.

    Whoops. Thanks! I’m learning!

    Moderator Andrew Nevins


    Forum moderator

    No worries.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Center image in text widget’ is closed to new replies.