Search This Blog

Wednesday, August 29, 2007

Centering text, pictures, advertisements, banners, search boxes

Previously, when you need to center "something" (which may be text, pictures, advertisements, banners or search boxes), all you need to do surround that "something" with the <center> and </center> tags, that is, what you have is


where that "something" could be the HTML or Javascript for displaying the picture, advertisement, banner or search box.

The situation is a bit murky now because the <center> tag is depracated in HTML 4.01, but will continue to work for sometime. However, it is not supported in XHTML 1.0 Strict DTD which is going to be more widely used as more and more mobile devices are used and you are encouraged not to use the <center> now. What you should do is to use inline CSS (Cascading Style Sheet). You should now use

<div style="text-align:center;">"something"</div>

instead, and you will no longer have to worry about what happens in the future.


  1. I'm pretty new at this so I like your blog.

    In some other blogs, I see at the end of each post something called «Permalink». I wonder how they get that to appear?!

  2. Thank you for this new feature. Now all I need is about a million or so people to visit my blog.
    This will aid many bloggers.

  3. Thanks for the tip, old man ;-). It's surprising how many pages are still transitional, not even strict 4.01. I myself went to the trouble of moving over to xhtml only to find that my cheap webhosting company didn't support it (so they claimed). Hard to believe, eh? Cheers, T.C.

  4. Thanks for this tip !

    hey i have some more on my site wanna like to see >>>
    S3 technology

  5. I was going through your you links and found that most of the downloads were tested in mcafee site advisor and thad most of the downlads had spyware and verry spammy pleas corect this.


  6. Hi McPuffin,

    Sorry for responding so late. Had to finish a long list of urgent tasks before I could get to this.

    Regarding your question, refer to

    Make Permalink more prominent (old classic template.

    New Blogger: Make permalink more prominent.

    Peter (Blog*Star)
    Testing Blogger Beta (now New Blogger)

  7. Thank you! Found the piece of code and fixed it.
    Oh by the way..that was a clever way to respond! I'll adopt that *smiles*

  8. Hi a.l,

    You can get tips for increasing visitors to you blog from How to build traffic to your blog.

    Peter (Blog*Star)
    Generating Revenue from your Website

  9. Hi Paultera135,

    This is your comment way up the page:

    "I was going through your you links and found that most of the downloads were tested in mcafee site advisor and thad most of the downlads had spyware and verry spammy pleas corect this."

    I am afraid I do not have anything for downloading on my site, so I don't know what you are referring to. Can you please give me an example so that I can check?


    Peter (Blog*Star)
    Dummies Guide to Google Blogger
    "online book" in progress

  10. Hello!!

    I would like to know on how to put menu tab on the site using CSS or something. (HOME, PROFILE for instance). Not just an ordinary menu tab link...


  11. Hi Loradz,

    Sorry, don't understand what you mean. What is the difference between menu tab and ordinary menu tab link?

    Peter Blog*Star
    Earn with blogs (Google group)
    (Blogging helped my put 2 sons through college on my pension. We want to help you do the same)

  12. Hey peter, i was wondering how you center the date with your text & photo's??
    And would you beable to email me the answer??
    Thanks :)

  13. Hey peter, I was wondering how you centre the date with your texts and photos???
    could you email me the answer??

    Thanks :)

  14. This helped me thanks!!

  15. Hello, i need some help
    How about making picture in left side bar become center? thx b4 :)

  16. Hi! I created my blog back in 2008 using the old templates, HTML, etc. and finding it vey frustrating now to change (I had to change my company name and so changed templates). I cannot for the life of me figure out how to center my logo in the header. I have googled this and tried all sorts of tips and tricks and noting works -- it is still left-centered. I tried this CSS tip and it didn't work for me. Any other thoughts? Thanks in advance!


  17. Need to know how what you did to get the logo in the Header

  18. Hey Peter, I have a question for ya. I want to center my page links in the center of my blog body and I'm not sure how to do that. Can you help?

  19. Not sure if I understand your question but generally you can center something you surround it by putting before it this tag -
    <div style="text-align:center;<
    and at the end of "it" whatever it may be by >/div<

    Now if you want something to be centered without you using those tags above, then you would have to do it in the template by editing the template via the template editor

  20. Hi Peter, I am trying to center a photo taken by me as my header. I tried the text you outlined in the beginning of this thread.

    I replaced "something" with "header", applied to my blog and nothing happened. What did I do incorrectly? I am using a MacBook Pro. Does that have anything to do with it? That has not made a difference with anything else so far. Thanking you in advance for your help.


  21. Where are you posting your photo? In post editor?

  22. Thanks For The Insight no more posting the < br/ > symbol every time I want to align my text


Related Posts Plugin for WordPress, Blogger...

Find topics by using the Google custom search box above which can search multiple blogs, or the SEARCH BLOG in the left corner of navbar. You can also find topics in the Label List and Categrories in the right sidebar.

For more information and special deals related to any of the issues on this page, place your cursor over the double-underlined links. All information supplied by

Disclaimer: This blog has no relation with Wiley Publications