How to center an image or advertisement in you website?

Some of bloggers like me (I'm an Accountant and I have learned PC troubleshooting and repair  by online) has a little knowledge in terms of html. So just yesterday when I'm looking at my site I've noticed that centering an ads on my site will give much more perspective. And to those who haven't learned it yet... study with me as I'am learning HTML online.

This is how to center your advertisement, links etc at your side bar.

Just add, <center> before the html and </center> after html. example you got a google ads that you want to center:

 
<center><script type="text/javascript">
<!--
google_ad_client = "pub-6626522695009490";
/* 160x600, created 6/9/08 */
google_ad_slot = "8750499228";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>


 del.icio.us  Stumbleupon  Technorati  Digg 

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this entry.
Comments

  • 6/27/2008 11:53 PM miCRoSCoPiC^eaRthLinG wrote:
    The center tag has been deprecated in HTML 4 quite sometime back. The idea is cool, but a better way of implementing it would be to wrap the script within div tags with styling applied... for example:
    <div style="text-align:center;">
    ...Script goes here...
    <div>

    Cheers,
    m^e
    Reply to this
Leave a comment

 Enter the above security code (required)

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.