Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 05-23-2007, 12:42 PM
killa101 killa101 is offline
 
Join Date: Aug 2004
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Ads not centered

Hey all. I was wondering if you could help me to get my google ads centered in my header. Here is how they are positioned right now:

http://www.pb-addict.com

You will notice they are aligned to the left but I want them centered.

Here is the code that I am using.

Code:
<if condition="$show['guest']">
<!-- Sponsor Ads -->
  <br /><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="728" align="center">
  <tr>
  <td class="tcat" colspan="6"><phrase 1="$vboptions[bbtitle]">Sponsors</phrase></td>
  </tr>
  <tr>
  <td bgcolor="#000000" colspan="6">
  <div align="center">
  <script type="text/javascript"><!--
google_ad_client = "removed";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2006-11-01: removed
google_ad_channel = "9295759247";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "ffffff";
google_color_text = "ffffff";
google_color_url = "ff9400";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
  </div>
  </td>
  </tr>
  </table>
  <br /><br />
  <!-- Sponsor Ads Ends -->
</if>
note: i just upgraded from 3.5.4 and that was the code i used in 3.5.4 and it worked then.

I just realized, this only happens in FireFox. In Internet Explorer its fine.. Any ideas what is wrong here?
Reply With Quote
  #2  
Old 05-23-2007, 03:00 PM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

width try at width="100%" cause right now in firefox it looks terrible
Reply With Quote
  #3  
Old 05-24-2007, 03:21 PM
Deviation Deviation is offline
 
Join Date: Sep 2005
Location: Ohio
Posts: 226
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not really a programming question (try the design forum)but.....

Here's how the code should be:
HTML Code:
<if condition="$show['guest']">
<!-- Sponsor Ads -->
  <br /><table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
  <tr>
  <td class="tcat" colspan="6"><phrase 1="$vboptions[bbtitle]">Sponsors</phrase></td>
  </tr>
  <tr>
  <td align="$stylevar[center]" bgcolor="#000000" colspan="6">
  <script type="text/javascript"><!--
google_ad_client = "removed";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2006-11-01: removed
google_ad_channel = "9295759247";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "ffffff";
google_color_text = "ffffff";
google_color_url = "ff9400";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
  </td>
  </tr>
  </table>
  <br /><br />
  <!-- Sponsor Ads Ends -->
</if>
Reply With Quote
  #4  
Old 05-25-2007, 12:13 AM
killa101 killa101 is offline
 
Join Date: Aug 2004
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for your help guys but it turns out wrapping the whole thing in <div align="center"> </div> solved the problem.
Reply With Quote
  #5  
Old 05-25-2007, 12:28 AM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that table dont look to well at width="730" why not do it width="100%" like your other tables cause it dont look right in firfox
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:39 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03718 seconds
  • Memory Usage 2,203KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete