Can you no longer center images in text widget?

  • Author
  • #599585


    I haven’t used WordPress in over a year and now I can no longer center images and text in text widget. Once I hit saves, it erases the center tags.


    The blog I need help with is




    <div style=”text-align:center;”>text or image</div>



    Thank you, sir!


    I am having the same trouble … am not able to centre images in my text widget.
    If I had an image entered like this … (below) …
    <img src=”” width=”250″ height=”100″>
    Then … where would I insert the code suggested by mspotilas?
    Looking forward to your assistance!
    Kind regards, Andrea
    PS This is a new blog “in progress” that I haven’t yet made public.


    Sorry … that code should read …

    <img src=”” width=”250″ height=”100″>

    Thanks … Ax


    I keep entering a ” ” at the end of the code … and when I hit submit … the comment drops this from the end. (Just for your info!)


    Weird … perhaps I need to know better HTML coding …

    <img src="" width="250" height="100"></a>

    Trying again … sorry! xax



    The optimum sidebar content width in the theme you’re using is 160px. So a) you can’t use the above 250px version, b) you don’t need anything extra for centering if you insert a 160px version, like this:
    <img src="" width="160" />

    If you want to center a narrower image, again you don’t need the extra div code mspotilas suggested; you just write this:
    <img class="aligncenter" src=[etc etc]

    On another issue: your blog takes too long to load because you’ve got too many images and other objects. You should limit the number of posts per page to only a few (Settings > Reading > “Blog pages show at most”). You can also truncate the posts on your front page by using the read-more tag:


    Firstly … thanks so much for your help … panaghiotisadam!
    I am a totally self taught blogger … and have just learnt everything by trial and error (& with the fab helps provided by WordPress!)

    I do realise that the max width for the theme Digg 3 Column on my published blog ( is 160 … but I am working on setting up another blog ( which is not published for public viewing as yet. The theme for this blog is Bueno and allows for the wider side column. So … I would like to get the images centred if possible.

    I tried entering the code as you suggested …
    <img class="aligncenter" src="" width="220" height="85"></a>
    But … the images still are aligned to the left.
    I would appreciate any suggestions or corrections! :)

    Also … thanks for the suggestion about my blog taking too long to load. I will work on reducing the content to improve this. There is nothing more frustrating to readers than a blog that takes ages to load … so I really appreciate the feedback!

    Kind regards


    @andrea, use the following and see what happens. Since we cannot actually see the site you are working on, we are sort of guessing. Some themes are a little finicky with what code you use.

    <img style="text-align:center;" src="" width="220" height="85"></a>


    @andrea: you’re welcome.

    The code I gave you was good for Digg 3. For Bueno you need mspotilas’ original suggestion:

    <div style="text-align:center;">
    <img src="" width="220" height="85"></a>

    So make sure we always know which blog/theme you’re talking about when you ask a question.

    Also note that you get better quality if you downsize the image in an image editing application, then upload and insert that version without the width and height in the code.


    Thanks so much … your coding worked for my Bueno blog!!! I really appreciate the assistance.

    Thank you too … for your help. I imagine that this might be the code for the Digg 3 theme? I will store your info for reference!

    What a great service! Thanks heaps!
    Kind regards, Andrea


    The code that Panos and mspotilas gave should work with all themes.


    Thanks for your help! xx

The topic ‘Can you no longer center images in text widget?’ is closed to new replies.