PDA

View Full Version : How do I center this?


powerful_rogue
08-24-2008, 01:37 PM
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 :)

<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, 02: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, 04:11 PM
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:

<!-- 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, 04: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, 04:41 PM
Hi Lynne,

Im really sorry, but I dont follow.

Which line do I need to remove?

Lynne
08-24-2008, 05:02 PM
Hi Lynne,

Im really sorry, but I dont follow.

Which line do I need to remove?
You cannot do this, just remove them:

<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, 05: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!