MyBB Community Forums

Full Version: Strange problem on 'thead' CSS [solved]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please see my forum index http://caejournal.com/forums.php
I have 5 category titles and only the first two have the 'thead' displayed correctly as per the CSS.
Here are all the instances of 'thead' in the CSS.
.thead {
	background: #FFFFFF;
	color: #A3362D;
	line-height: 1.8;
        font-size: 16px;
	font-weight: bold;
}

.thead a:link {
	color: #A3362D;
	text-decoration: none;
	font-size: 16px;
	font-weight: bold;
}

.thead a:visited {
	color: #A3362D;
	text-decoration: none;
	font-size: 16px;
	font-weight: bold;
}

.thead a:hover, .thead a:active {
	color: orange;
	text-decoration: none;
	font-size: 16px;
	font-weight: bold;
}

Here is the forumbit_depth1_cat:
<tr><td class="thead" colspan="5">
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br />
<div class="smalltext">{$forum['description']}</div>
</div></td></tr>

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr><td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="240" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody></table>
<br />
Note: It's modified for my use. thead is taken out of the div and put in a <td>. But still, why the first two category titles are displayed correctly and not the rest? Strange.

Thank you for the help.
Hmm I'm not sure what is affecting the CSS, but shouldn't you have {$sub_forums} in a row and column?
This is quite strange when I use my Web Developer Tool it shows me that the thead CSS doesn't affect the category title. The HTML seems to be the same only the CSS not.

Working one:
[Image: capture.png]
<tr>
<td class="thead" colspan="5">
<!-- <div class="expcolimage"><img src="images//collapse.gif" id="cat_6_img" class="expander" alt="[-]" title="[-]" /></div> -->
<div><strong><a href="forumdisplay.php?fid=6">Numerical Simulations</a></strong><br />
<div class="smalltext"></div>
</div>
</td>
</tr>

Not working one:
[Image: capture.png]
<tr>
<td class="thead" colspan="5">
<!-- <div class="expcolimage"><img src="images//collapse.gif" id="cat_7_img" class="expander" alt="[-]" title="[-]" /></div> -->
<div><strong><a href="forumdisplay.php?fid=7">Computer Modeling</a></strong><br />
<div class="smalltext"></div>
</div>
</td>
</tr>

Their must be something in the global CSS file or another CSS file that is attached to the forum that is interfering as the HTML is the same.
Thank you.
I observed the same thing.
The not-working ones are just using a:link. The working ones are using thead. But the html template is the same. So why would they render differently? It puzzles me.

I agree with you.
Link to the global.css
Please let me know if you could find the error. Where else should I look?
Thanks.
(2010-06-04, 02:38 PM)PHP_Paul Wrote: [ -> ]Hmm I'm not sure what is affecting the CSS, but shouldn't you have {$sub_forums} in a row and column?

Thanks. Does that effect the category definition?
I am puzzled it seems to be the HTML now. The two categories that work are in a table and they are in the thead class the other once are not:

[Image: capture.png]


[Image: capture.png]


[Image: capture.png]

Try reverting your Forum Bit and Index Templates.
Thanks a lot Bob.
Reverting to the original forumbit template solved the problem. It still puzzles me how the same template can behave differently.
My original objective was to have no border for the category title. I wish I could do that.
(2010-06-04, 08:33 PM)neoflight Wrote: [ -> ]Thanks a lot Bob.
Reverting to the original forumbit template solved the problem. It still puzzles me how the same template can behave differently.
My original objective was to have no border for the category title. I wish I could do that.
It is possible change the forumbit_depth1_cat template too:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="theadborder">
<thead>
<tr>
<td class="thead" colspan="5">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong> <span class="smalltext">{$forum['description']}</span></div>
</td>
</tr>
</thead>
</table>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>Statistics</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />

Than in global.css make a new class called theadborder:

.theadborder {
	background: #fff;
	width: 100%;
	margin: auto;
	margin-bottom: 20px;
}

And give the .thead and .theadborder the same background as the container:
.thead {
	background: #fff;
	font-size: 20px;
	height: 40px;
	font-weight: bold;
	padding-bottom: 5px;
	text-decoration: none;
	border-bottom: 5px solid #e4e4e4;
	color: #23262b;
}
I did it on: http://colourtechni.com/portfolio/newera/forums.php
Thanks. I will check it out soon.
Thanks. That template worked. There was some problem with my HTML. Smile