vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   <tbody> vs. <table> (https://vborg.vbsupport.ru/showthread.php?t=119329)

lightnb 06-22-2006 05:35 AM

<tbody> vs. <table>
 
1 Attachment(s)
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:

HTML Code:

<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:

HTML Code:

<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:

HTML Code:

<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:

HTML Code:

<!-- 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...


All times are GMT. The time now is 07:14 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.01034 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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