Trying to center my Google ads... |
Trying to center my Google ads... |
Renfield |
Jul 1 2008, 03:46 PM
Post
#1
|
Newbie Group: Members Posts: 10 Joined: 29-March 08 Member No.: 5,314 |
Hello,
I need help centering my Google ads here: http://www.necroticobsession.com Here's the code as I have it so far. I put a line of stars to denote when the Google ad tables start. Obviously that line is not actually in the code, but I thought it best to include some context so I included teh code right before the ads. Any help, please? CODE <br clear="all" /> <table width="100%" cellspacing="1"> <tr> <td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}"><!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}"><span class="gensmall">{L_QUICK_MOD}:</span> {S_TOPIC_MOD} <input class="btnlite" type="submit" value="{L_GO}" /></form><!-- ENDIF --></td> <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td> </tr> </table> <br clear="all" /> <table width="100%" cellspacing="0"> <tr> <td><!-- IF S_DISPLAY_SEARCHBOX --><!-- INCLUDE searchbox.html --><!-- ENDIF --></td> <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></td> </tr> </table> ***********Google ads below********** <table> <tr> <td width="728" align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-6542213538697851"; /* 728x90, created 7/1/08 */ google_ad_slot = "6451598783"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td> </tr> </table> <table> <tr> <td width="728" align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-6542213538697851"; /* 728x90, created 7/1/08 */ google_ad_slot = "6451598783"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td> </tr> </table> <!-- INCLUDE overall_footer.html --> |
pandy |
Jul 1 2008, 05:05 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Turn the table borders on so you can see what's going on. You've centred the content inside the TDs, when you should have centered the tables on the page.
Get rid of the tables and put both scripts in a DIV instead. Less code. HTML <div style="text-align: center"> ... </div> A DIV automatically spans the whole page while a table shrinkwraps. That's why the DIV doesn't need to be centered. You'd better put a BR or something between the too scripts so you don't end up with the iframes alongside each other on a screen with big enough resolution. |
Renfield |
Jul 1 2008, 05:38 PM
Post
#3
|
Newbie Group: Members Posts: 10 Joined: 29-March 08 Member No.: 5,314 |
Hmmm...
I rewrote it the way you said and it still didn't seem to work. Here it is rewritten. Maybe you can see something that I'm missing? CODE <div style="text-align: center"> <script type="text/javascript"><!-- google_ad_client = "pub-6542213538697851"; /* 728x90, created 7/1/08 */ google_ad_slot = "6451598783"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <div style="text-align: center"> <script type="text/javascript"><!-- google_ad_client = "pub-6542213538697851"; /* 728x90, created 7/1/08 */ google_ad_slot = "6451598783"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <!-- INCLUDE overall_footer.html --> |
pandy |
Jul 1 2008, 05:55 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Should work.
|
Renfield |
Jul 1 2008, 06:17 PM
Post
#5
|
Newbie Group: Members Posts: 10 Joined: 29-March 08 Member No.: 5,314 |
Yeah, sorry. The board I use caches files on the server and they need to be refreshed before they show up right. It works. Thanks for your help.
|
Lo-Fi Version | Time is now: 29th March 2024 - 06:44 AM |