vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I center this? (https://vborg.vbsupport.ru/showthread.php?t=188986)

powerful_rogue 08-24-2008 12:37 PM

How do I center this?
 
1 Attachment(s)
Hi,

I was wondering if anyone could tell me what I would need to do to center the banner in the middle. Heres is a copy of the code.

Ive tried having a play around but with no luck :)

PHP Code:

<tr>
    <
td style="text-align: $stylevar[left]; width: 44px;" class="tcat"><img src="$stylevar[imgdir_misc]/block_1.gif" alt="" width="44" height="42"></td>
        <
td class="tcat" style="background-image: url($stylevar[imgdir_misc]/cat_mid.gif); text-align: left; width: 260px;">Block 1</td>
<
td style="background-image:url($stylevar[imgdir_misc]/catbg_mid.gif);"></td>
</
tr>

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="$stylevar[outertablewidth]align="center">

<
tr>
        <
td class="thead" colspan="2">Title</td>
</
tr>
<
tr>
<
td class="alt1"><align="center">
<
a href="http://www.jdoqocy.com/m6101xdmjdl04253289021593247" target="_blank" onmouseover="window.status='http://www.skype.com';return true;" onmouseout="window.status=' ';return true;">
<
img src="http://www.lduhtrp.net/j0103kpthnl6A8B98EF687BF98AD" alt="" border="0"/></a>

    </
td>
</
tr>
</
table


Lynne 08-24-2008 01:49 PM

Notice that you have two columns for Title, but one for the image. Either get rid of the colspan=2 on the title, or add it for the image.

powerful_rogue 08-24-2008 03:11 PM

1 Attachment(s)
Hi,

Thanks for your reply. Ive jioggled it around a bit so ive now got the following (I had no need for a title!) But still cant get the banner in the center of the table.

This is my code now:

PHP Code:

<!-- Start of Side Menu -->
<
table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<
tr>
<
td valign="top" width="200px">

<
table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">






<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0"   >






<
table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">




<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="$stylevar[outertablewidth]align="center">

<
tr>
        
</
tr>
<
tr>
<
td class="alt1"><align="center">
<
a href="http://www.jdoqocy.com/m6101xdmjdl04253289021593247" target="_blank" onmouseover="window.status='http://www.skype.com';return true;" onmouseout="window.status=' ';return true;">
<
img src="http://www.lduhtrp.net/j0103kpthnl6A8B98EF687BF98AD" alt="" border="0"/></a>

    </
td>
</
tr>
</
table


Lynne 08-24-2008 03:36 PM

Your syntax is incorrect, so it's hard to know what is causing the problem. You can't have a row tag without any columns in it. Get rid of that.

powerful_rogue 08-24-2008 03:41 PM

Hi Lynne,

Im really sorry, but I dont follow.

Which line do I need to remove?

Lynne 08-24-2008 04:02 PM

Quote:

Originally Posted by powerful_rogue (Post 1605915)
Hi Lynne,

Im really sorry, but I dont follow.

Which line do I need to remove?

You cannot do this, just remove them:

PHP Code:

<tr
         
</
tr

Actually, looking at your template, is that really what you have? You need to go look at an html coding site. If you have a table, you must have row and column tags. You must put stuff in the columns. The one in post 1 looks fine, but the one in post 3 is totally wrong syntactically.

powerful_rogue 08-24-2008 04:19 PM

Ah right.

Thats the way the template was coded. Hmmm

Thanks for your help Lynn. I'll have to leave it as it is. I thought it may have just been a quick fix!


All times are GMT. The time now is 10:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01659 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete