MyBB Community Forums

Full Version: <table style...> not valid xhtml
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i'm using a myBB theme that i really like, but it's using <table style...> in one of the tags in the index_stats, which is not proper xhtml 1.0 transitional. i'm trying to get validated, i've removed over 13 errors, this is the last one left.

here is a copy of the template: (i highlighted the problematic portion in bold/red)

any ideas how i can fix this?

Quote:<table style="border:1px solid #81a2c4;" cellspacing="0" cellpadding="5" width="100%">
<tbody style="border:1px solid #81a2c4;" id="boardstats_f">


<tr style="border:1px solid #81a2c4;">
<td class="trow1" width="65%" valign="top">
<h3><strong>{$lang->whos_online}</strong></h3>

<span class="smalltext">{$lang->online_note} &nbsp;[<a href="online.php">{$lang->complete_list}</a>]<br />{$onlinemembers}</span>
<br /><br />

<h3><strong>Forum Legend</strong></h3>


<dl class="forum_legend smalltext">
<dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->new_posts}</dd>

<dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->no_new_posts}</dd>

<dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />



</td>

<td class="trow2" width="35%" valign="top" style="border-left: 1px solid #fff;">
<h3><strong>{$lang->boardstats}</strong>
</h3>
<span class="smalltext">
{$lang->stats_posts_threads}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
{$lang->stats_numusers}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
{$lang->stats_newestuser}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
{$lang->stats_mostonline}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
</span>
</td>
</tr>

</tbody>
</table>





<!-- Original template


<tr><td class="tcat"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>-->
What doctype are you using?
(2010-12-05, 01:23 PM)Zack Magee Wrote: [ -> ]What doctype are you using?

xhtml 1.0 transitional

http://www.thelonelylife.com/
Try adding width:100%; to the end of style, and removing the width="100%"
basically this is a poorly written template that is not valid xhtml 1.0 transitional, as the theme claims to be.

i removed the "style" element from the <table> tag and instead used "class" and CSS. that is working fine.'

but the validator is telling me that the table element can not exist where it does.

here is the complete template for anybody who might be interested and know a little more than me:
Quote:<!--***<table style="border:1px solid #81a2c4;" cellspacing="0" cellpadding="5" width="100%">***-->
<table class="index_stats">
<tbody style="border:1px solid #81a2c4;" id="boardstats_f">


<tr style="border:1px solid #81a2c4;">
<td class="trow1" width="65%" valign="top">
<h3><strong>{$lang->whos_online}</strong></h3>

<span class="smalltext">{$lang->online_note} &nbsp;[<a href="online.php">{$lang->complete_list}</a>]<br />{$onlinemembers}</span>
<br /><br />

<h3><strong>Forum Legend</strong></h3>


<dl class="forum_legend smalltext">
<dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->new_posts}</dd>

<dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->no_new_posts}</dd>

<dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />



</td>

<td class="trow2" width="35%" valign="top" style="border-left: 1px solid #fff;">
<h3><strong>{$lang->boardstats}</strong>
</h3>
<span class="smalltext">
{$lang->stats_posts_threads}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
{$lang->stats_numusers}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
{$lang->stats_newestuser}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
{$lang->stats_mostonline}<br /><img src="{$theme['imgdir']}/hr.png" alt="" width="100%" height="1px"style="margin-top:5px; margin-bottom:5px;" />
</span>
</td>
</tr>

</tbody>
</table>



<!-- Original template


<tr><td class="tcat"><span class="smalltext"><strong>{$lang->boardstats}</strong></span></td></tr>
<tr>
<td class="trow1"><span class="smalltext">
{$lang->stats_posts_threads}<br />
{$lang->stats_numusers}<br />
{$lang->stats_newestuser}<br />
{$lang->stats_mostonline}
</span>
</td>
</tr>-->
I'm working on this as we speak. Give me a minute.
You can't nest a table inside a table. If you want to give me admin access I can fix the template.
oh, let me see if i can set up an admin account for you,

i've sent you a pm Smile