Centering Text and images

  • Author
  • #541582


    Can someone show me how I center text and images

    The blog I need help with is


    When you insert an image, select “center alignment” while in the “insert image” screen and then insert the image.

    For text, set center alignment before you start typing the text into the editor, or if the text is already there, select the text and then click the center alignment button on the tool bar.


    If the image is already inserted, click on the image, then click on the edit image icon that appears at the top left of the image (mountain icon) and select the alignment for the image.



    Tried that and nothing…it’s off center now because of the absence of the sidebar.


    I told you in the other thread that you have to adjust the margins for the content area to make the content go full-width.



    Maybe I need to preview in a browser uploaded as a regular web page..When I change the values as you suggested nothing happens. If I move the text with my cursor it starts into the next line. The image icon says it is centered so it probably is…just doesn’t look that way when I visit the site on wordpress


    You need to add the following to the bottom of your CSS. You do NOT have it in your CSS.

    #content {
    margin:0 0 0 20px;

    If you are relying on the preview function then you might have to force refresh the preview page since the preview function has basically been broken for about six months.

    Here is your blog with the above CSS applied to it.



    This is probably a really stupid question but how do I apply #content {
    margin:0 0 0 20px;


    You add it to the end of your custom CSS.



    You mentioned it is not centered because of the absence of a sidebar. In your dashboard, under “Pages” you can choose “Page Attributes”. There is one for “one column, no sidebar”. (I’m not sure if this is on all themes, though.) If so, I think that would center the image the way you want, if I am understanding you correctly.




    Okay…Hmm appears I don’t have custom css. Here’s the thing. I have a website that was created by frontpage. If I start to lay it out here under the 5mg limit will the server allow me to make the changes to positioning. Or is it better to subscribe to the extra’s here and transfer it later. In input to date is greatly appreciated.


    @xevolution, that only applies to static pages that you create, it does not apply to the blog main page, nor to category, tag or archive pages (pages that show posts).


    Hi thesacredpath,

    Thank you for the information. Shadowfax’s blog only has one post, so I thought maybe a page was what he wanted instead. I appreciate the clarification.



    Not a problem. Since they had the CSS upgrade anyway, I was suggesting handling it through there. I don’t know if they are going to be adding any more posts or not though. If not, switching to a static main page and doing your suggestion would certainly work.



    Friendly advice: Maybe it would be a good idea to lurk, become familiar with all the support documentation, the links to all work arounds, the use of the forum and support pages and Google searches,etc. That’s what we Volunteers have done so we can be reasonably assured that we do have the correct answers to questions and we do not mislead or confuse our fellow bloggers when we post into threads. If you choose to do that then we Volunteers won’t have to chase from thread to thread correcting wrong information and responding to apologies. :)
    P.S. No response to this advice is required.



    Actually timethief you started this by telling me I had posted in the wrong forum making the assumption I had CSS editing capability. Because of that the sacredpath was advising me based on that assumption and I couldn’t figure out why his text changing suggestions could not be applied because as it turns out I don’t have that capability.
    xevolutionist comes in to offer an explanation and your all over him while the source of the problem for me to get advice actually stems from you. I think you’ve wasted alot of peoples time.


    @shadowfax1, sorry for all the confusion. Since you do not have the CSS upgrade (I thought you did by looking at your blog, so part of the error is mine.

    To get rid of the sidebar without the CSS upgrade, you will have to turn that post you have on your main page into a page, select “one column, no sidebar” from the page template and publish that page. Name it “home” or “welcome” or whatever you wish.

    Next you will have to set that page as a static front page for your site.

    Next, if you are not using the “custom menu” then go to appearance > menu and create a new menu. add the pages to the menu and arrange them as you wish (you might have to click the “view all” button to see all the pages). Save the menu when done. Then from the “Theme location module to the left in that page, select the menu name you created in the “primary location” pulldown and then save.


    Oh, and open each page you have in the editor and select “one column no sidebar” from the page template pulldown and update the page if you wish to get rid of the sidebar from all pages.



    Thankyou thesacredpath…I’m sorry we couldn’t have done this many post ago….I was looking at one of your sites and you have a plugin….at least I’m assuming it is that shows a thumbnail picture that when clicked on turns into a larger pic…very cool. can you tell me the name of the plugin?

    Many thanxs for all your time and trouble!


    Actually that is built into the theme I’m using on my self-hosted blog. There are plugins that can do that for self-hosted blogs, but we can’t use plugins here at wordpress.COM.

    There is a trick that you can use, but it is a little funky. You have to put the “socialvibe” widget into your sidebar. This blog post has a screencast on how to do it.

The topic ‘Centering Text and images’ is closed to new replies.