Forum tables seem to be broken
-
I have been trying to add a table to a forum reply. Unfortunately the table and its contents don't appear in a preview. Here is an example in Bulletin Board Code:
[table][tr][td]Column 1[/td] [td]Column2[/td][/tr][/table]
and in "non code" form:
| Column 1 | Column2 |
In preview there is no table.
-
The table doesn't show up once the topic is posted. This is true when I use Firefox and true when I use Google Chrome.
A chance glance at the display on a different laptop from a different angle (probably about 45o to the screen instead of perpendicular to the screen) showed the table appears as bright white text on a "silver" background! Not very useful. An attempt to change the table text to black by```
[color]
[table][tr][td]Column 1[/td] [td]Column2[/td][/tr][/table]
[/color]| Column 1 | Column2 | which is also not very useful.
-
Hmm,
It appears in the preview for me, however I can't see it unless I select the text as it's white on white!Steve
Edit: Alternate postings appear to be white or very light grey so if you're lucky you can just see it. ::)
-
| Testing | with colors |
And it's not only thing which is broken. because i used only one tr and two td's in this post
-
It's been broken for years… I tried to fix it once, never did find the css responsible, but I didn't have much time to spend on it then. It's something in SMF. Not sure if it's part of the theme or what.
-
While reading up on how BBCode tables are supposed to work I stumbled on this forum post.
It seems to idicate the behaviour of the table tag is at least partially controlled by the subs.php file:
array( 'tag' => 'table', 'before' => '', 'after' => ' ', 'trim' => 'inside', 'require_children' => array('tr'), 'block_level' => true, ),
So perhaps it's not inheriting the colour for what ever reason. Perhaps it could just be set to black instead.
Beyond my skills TBH.Steve
-
Looks like it is actually inherited, from the main css of the theme…
body, td, th , tr { color: #ffffff; font-size: small; font-family: verdana, sans-serif; }
Changing that also changes the color of many other areas on the site, like the page number at the bottom of the thread though.
-
So recreation of css is next thing
-
Changing that also changes the color of many other areas on the site, like the page number at the bottom of the thread though.
That would be bad. So why not just change the table tag to not inherit the style:
'tag' => 'table', 'before' => '', 'after' => ' ', 'trim' => 'inside', 'require_children' => array('tr'), 'block_level' => true,
Or am I missing something obvious?
Steve
-
Tried that (that's how it is now, check the html source) apparently the css takes precedence.
-
aha, the table tag didn't do it, but the td tag did.
-
Excellent! ;D
Of course now this thread is littered with tables. :D
Steve
-
Thanks Jimp.
I have SMF 1.1.4 installed on my home server and it displays tables with black text and usesOf course the page layout looks rather different.
Perhaps the real problem is in the pfSense stylesheet.
The default style sheet on the SMF 1.1.4 installation includes:```
/* By default (td, body..) use verdana in black. */
body, td, th , tr
{
color: #000000;
font-size: small;
font-family: verdana, sans-serif;
}I have only minimal experience with stylesheets so wouldn't suggest that anyone take this speculation very seriously: I wonder about the style sheet snippet Jimp posted earlier. Some parts of the default pfSense theme have white text on a black background (style smalltext?) but other parts have black text on a light background (style post?). Perhaps the style sheet part that generates black text on a light background needs to also do so for "td".
-
Its broken again. Or maybe I just imagined display of tables was fixed.
-
How about now?
-