View Full Version : <tbody> vs. <table>
lightnb
06-22-2006, 05:35 AM
I'm running into a problem where using <tbody> causes the header bar to malfuntion, while using <table> in it's place fixes the header bar, but causes other things to go wrong.
What is the difference between these two tags, and more importatly, what can i do to make one of them work right?
I've attached two screen shots showing the difference. The first uses <table>, the second, <tbody>.
Zachery
06-22-2006, 06:41 AM
Need to see all of your code, but
a <table> tag is the start of a table, tbody is definging the body or part of the body of a table. So correct syntax
<table>
<thead>
<tr><td></td></tr>
</thead>
<tbody>
<tr><td></td></tr>
</tbody>
</table>
You should be able to use tbody without a thead.
lightnb
06-22-2006, 06:52 AM
This is the code from the default vB 'forumhome_forumbit_level1_nopost' template:
<tbody>
<tr>
<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
</tr>
</tbody>
I'm trying to add:
<td width="17"><img src="./images/trapazoid/tcat_left.jpg" width="17" height="25"></td>
Somewhere, so that these images act as 'endcaps'.
The code I'm using (that doesn't work right) is:
<tbody>
<tr>
<td><img src="http://www.rahlentertainment.com/livexchange/forums/images/trapazoid/tcat_left.jpg"></td>
<td class="tcat" width="100%" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>" background="http://www.rahlentertainment.com/livexchange/forums/images/trapazoid/tcat_span.jpg">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td><img src="http://www.rahlentertainment.com/livexchange/forums/images/trapazoid/tcat_right.jpg"></td>
</tr>
</tbody>
Zachery
06-22-2006, 06:56 AM
The issue comes down to the first part of the table, this table is setup for 1 td looking at the templatem you're adding another one, you need to add a row/column span, or add an additional td tag to the first part of the table.
lightnb
06-22-2006, 07:01 AM
How or where would I go about doing that?
Zachery
06-22-2006, 07:12 AM
Its your code :) so I can't tell you/
lightnb
06-22-2006, 07:28 AM
It's actually vB's code... I'm just trying to tweak it. There is no <table> tag in the template I'm working in, so I'm assuming it comes from somwhere else?
tgreer
06-22-2006, 11:28 AM
Try looking in FORUMHOME, as no doubt there is a table inside of it, and that table uses the $forumhome_blah_blah_bit variable which CONTAINS the template you're editing.
lightnb
06-23-2006, 04:24 PM
Found it:
<!-- main -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
$forumbits
</table>
<!-- /main -->
But I'm not sure what to do in order to fix the problem...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.