[Mediawiki-l] properly nesting tables

Sy Ali sy1234 at gmail.com
Tue Jun 6 16:02:19 UTC 2006


On 6/6/06, Frederich, Eric  P2173 <eric.frederich at siemens.com> wrote:
> If I have tons of stuff that I want in a nested table is there a way to globally apply the style="border: none" to every cell rather than be having to explicitly set it on every cell as I did below?

So far, it sounds like you have two solutions.  The first is to force
a style for every row, and the second is to apply a separate
"borderless" class to the entire table.

First:
{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| style="border: 0" width="50" valign="top" | '''Note:'''
| style="border: 0" | {{{1}}}
|}

Second:
{| class="borderless" width="75%" cellpadding=0 cellspacing=0
style="background-color: #c1ffc1; border: 1px dashed green; padding:
0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| {{{1}}}
|}

Maybe one solution to avoid the entire issue is to modify the default
table class and add !important to force it as a default.  Something
like this:

table th, table td {
 border: none !important;
}

Then, unless you explicitly state that a table has a certain class
which has a border, it will not have a border.

My CSS isn't sharp enough to suggest a complete solution, or test
this, but this feels like it's going in the right direction.



More information about the MediaWiki-l mailing list