properly nesting tables

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

properly nesting tables

Frederich, Eric P21322
So I finally got the wikitable css stuff working to make my tables look
pretty whenever I say class="wikitable".
Now my problem is if I wanted to have a non-wikitable inside of it.
 
I have a template called Box Note that looks like this....
 
{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| {{{1}}}
|}
 
...
 
It looks very nice and doesn't show any internal borders around each
cell.
But if I use it nested within a wikitable now all of a sudden I see the
borders in the note.
This happens if I use the template above for a note or if I were to
manually nest the table as shown below (so if anyone wanted to try this
out they wouldn't have to create and save a template).
 
So my question is how do I get rid of all of that style info and
properly nest two tables with different styles?
 
Thanks,
~Eric
 
{| class="wikitable"
|-
| valign="top" |
* click this
* press that
* hit okay

{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| Sometimes you have to wait a bit.
|}
|
[[Image:Screenshot 01.jpg|200 px]]
|-
| valign="top" |
* Press Enter
|
[[Image:Screenshot 02.jpg|200 px]]
|-
| valign="top" |
* fill out form
* cross your fingers
* hit enter
|
[[Image:Screenshot 03.jpg|200 px]]
|}
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Bugzilla from sy1234@gmail.com
On 6/5/06, Frederich, Eric  P2173 <[hidden email]> wrote:
> So I finally got the wikitable css stuff working to make my tables look
> pretty whenever I say class="wikitable".
> Now my problem is if I wanted to have a non-wikitable inside of it.

Maybe you need some sort of class="notwikitable" which explicitly does
_not_ have those settings.

There are also "priorities" for css, which could be useful .. but I
unfortunately don't know much about those.  =/
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Frederich, Eric P21322
In reply to this post by Frederich, Eric P21322
Does anyone know how to get rid of this?
I found that if I put the following in MediaWiki:Common.css I can get
rid of those borders if I set the nested table to use class="hrm".

table.hrm {
}

table.hrm th, table.hrm td {
  border: 0;
}

Is there a way I can override this in the template itself rather than
using a class?

I tried putting border: 0, and border="0" on this line...
| border="0" width="50" valign="top" | '''Note:'''

But that didn't get rid of it.
I would much rather fix this in the templates than use some class to get
rid of the borders but I don't know where to put it.

Thanks,
~Eric


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Frederich, Eric
P2173
Sent: Monday, June 05, 2006 4:19 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] properly nesting tables

So I finally got the wikitable css stuff working to make my tables look
pretty whenever I say class="wikitable".
Now my problem is if I wanted to have a non-wikitable inside of it.
 
I have a template called Box Note that looks like this....
 
{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| {{{1}}}
|}
 
...
 
It looks very nice and doesn't show any internal borders around each
cell.
But if I use it nested within a wikitable now all of a sudden I see the
borders in the note.
This happens if I use the template above for a note or if I were to
manually nest the table as shown below (so if anyone wanted to try this
out they wouldn't have to create and save a template).
 
So my question is how do I get rid of all of that style info and
properly nest two tables with different styles?
 
Thanks,
~Eric
 
{| class="wikitable"
|-
| valign="top" |
* click this
* press that
* hit okay

{| width="75%" cellpadding=0 cellspacing=0 style="background-color:
#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| width="50" valign="top" | '''Note:'''
| Sometimes you have to wait a bit.
|}
|
[[Image:Screenshot 01.jpg|200 px]]
|-
| valign="top" |
* Press Enter
|
[[Image:Screenshot 02.jpg|200 px]]
|-
| valign="top" |
* fill out form
* cross your fingers
* hit enter
|
[[Image:Screenshot 03.jpg|200 px]]
|}
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Alexis Moinet
try style="border: none;"

{| width="75%" cellpadding=0 cellspacing=0 style="background-color:#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| style="border: none;" width="50" valign="top" | '''Note:'''
| style="border: none;" | Sometimes you have to wait a bit.
|}

Frederich, Eric P2173 a écrit :

> Does anyone know how to get rid of this?
> I found that if I put the following in MediaWiki:Common.css I can get
> rid of those borders if I set the nested table to use class="hrm".
>
> table.hrm {
> }
>
> table.hrm th, table.hrm td {
>   border: 0;
> }
>
> Is there a way I can override this in the template itself rather than
> using a class?
>
> I tried putting border: 0, and border="0" on this line...
> | border="0" width="50" valign="top" | '''Note:'''
>
> But that didn't get rid of it.
> I would much rather fix this in the templates than use some class to get
> rid of the borders but I don't know where to put it.
>
> Thanks,
> ~Eric
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Frederich, Eric
> P2173
> Sent: Monday, June 05, 2006 4:19 PM
> To: MediaWiki announcements and site admin list
> Subject: [Mediawiki-l] properly nesting tables
>
> So I finally got the wikitable css stuff working to make my tables look
> pretty whenever I say class="wikitable".
> Now my problem is if I wanted to have a non-wikitable inside of it.
>  
> I have a template called Box Note that looks like this....
>  
> {| width="75%" cellpadding=0 cellspacing=0 style="background-color:
> #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
> |-
> | width="50" valign="top" | '''Note:'''
> | {{{1}}}
> |}
>  
> ...
>  
> It looks very nice and doesn't show any internal borders around each
> cell.
> But if I use it nested within a wikitable now all of a sudden I see the
> borders in the note.
> This happens if I use the template above for a note or if I were to
> manually nest the table as shown below (so if anyone wanted to try this
> out they wouldn't have to create and save a template).
>  
> So my question is how do I get rid of all of that style info and
> properly nest two tables with different styles?
>  
> Thanks,
> ~Eric
>  
> {| class="wikitable"
> |-
> | valign="top" |
> * click this
> * press that
> * hit okay
>
> {| width="75%" cellpadding=0 cellspacing=0 style="background-color:
> #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
> |-
> | width="50" valign="top" | '''Note:'''
> | Sometimes you have to wait a bit.
> |}
> |
> [[Image:Screenshot 01.jpg|200 px]]
> |-
> | valign="top" |
> * Press Enter
> |
> [[Image:Screenshot 02.jpg|200 px]]
> |-
> | valign="top" |
> * fill out form
> * cross your fingers
> * hit enter
> |
> [[Image:Screenshot 03.jpg|200 px]]
> |}
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Bugzilla from sy1234@gmail.com
In reply to this post by Frederich, Eric P21322
On 6/6/06, Frederich, Eric  P2173 <[hidden email]> wrote:
> I found that if I put the following in MediaWiki:Common.css I can get
> rid of those borders if I set the nested table to use class="hrm".

You're right.  I tried this myself[1] and the only way I could get a
nested table to shed its parent's style is to give it a style all its
own.

Maybe someone else who knows more about css can shed some light.  Is
there a way to modify the original wikitable style to tell it to only
apply its style to itself and not any sub-tables?


[1] http://jrandomhacker.info/MediaWiki:Common.css#Nested_tables_inherit_style
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Bugzilla from sy1234@gmail.com
In reply to this post by Alexis Moinet
On 6/6/06, Alexis Moinet <[hidden email]> wrote:
> try style="border: none;"

That was my thought as well.  I tried it and it wouldn't work.
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Alexis Moinet
Sy Ali a écrit :
 > On 6/6/06, Alexis Moinet <[hidden email]> wrote:
 >> try style="border: none;"
 >
 > That was my thought as well.  I tried it and it wouldn't work.

well, you made a little mistake ;-) see below (copy/paste it and test) : (the style="" MUST be aside of the line you want to
"un-border"

(I tested your code and had the same result as yours (with border), then I tested this and it worked fine)

{| class="wikitable"
|-
| The "wikitable" class paints a border around its table
|-
|
{|
|-
| style="border: none;" | A border appears around this table, even though I'm trying to explicitly turn it off
|}
{| class="plain"
|-
| The only solution is to use a "plain" style which does not paint a border
|}
|}


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Bugzilla from sy1234@gmail.com
On 6/6/06, Alexis Moinet <[hidden email]> wrote:
> Sy Ali a écrit :
>  > That was my thought as well.  I tried it and it wouldn't work.
>
> well, you made a little mistake ;-) see below (copy/paste it and test) : (the style="" MUST be aside of the line you want to
> "un-border"

Hey, you're right.  Thanks,
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Alexis Moinet
In reply to this post by Alexis Moinet
FYI, if you are interested by understanding what happens, you can try this code :

{| class="wikitable"
|-
| The "wikitable" class paints a border around its table
|-
|
{| style="border: 1px dashed blue;"
|-
| style="border: 1px solid green;" | A border appears around this table, even though I'm trying to explicitly turn it off
|}
{| class="plain"
|-
| The only solution is to use a "plain" style which does not paint a border
|}
|}

Actually the first style apply in to <table> and the second apply to <td>

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Frederich, Eric P21322
In reply to this post by Frederich, Eric P21322
I tried with style="border: 0" and it worked, I will change it to border: none; if that is the preferred way.
See my new template below.  Now this leads to a new question.  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?

{| 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}}}
|}

~Eric

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alexis Moinet
Sent: Tuesday, June 06, 2006 10:25 AM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] properly nesting tables

try style="border: none;"

{| width="75%" cellpadding=0 cellspacing=0 style="background-color:#c1ffc1; border: 1px dashed green; padding: 0px 4px;"
|-
| style="border: none;" width="50" valign="top" | '''Note:'''
| style="border: none;" | Sometimes you have to wait a bit.
|}

Frederich, Eric P2173 a écrit :

> Does anyone know how to get rid of this?
> I found that if I put the following in MediaWiki:Common.css I can get
> rid of those borders if I set the nested table to use class="hrm".
>
> table.hrm {
> }
>
> table.hrm th, table.hrm td {
>   border: 0;
> }
>
> Is there a way I can override this in the template itself rather than
> using a class?
>
> I tried putting border: 0, and border="0" on this line...
> | border="0" width="50" valign="top" | '''Note:'''
>
> But that didn't get rid of it.
> I would much rather fix this in the templates than use some class to get
> rid of the borders but I don't know where to put it.
>
> Thanks,
> ~Eric
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Frederich, Eric
> P2173
> Sent: Monday, June 05, 2006 4:19 PM
> To: MediaWiki announcements and site admin list
> Subject: [Mediawiki-l] properly nesting tables
>
> So I finally got the wikitable css stuff working to make my tables look
> pretty whenever I say class="wikitable".
> Now my problem is if I wanted to have a non-wikitable inside of it.
>  
> I have a template called Box Note that looks like this....
>  
> {| width="75%" cellpadding=0 cellspacing=0 style="background-color:
> #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
> |-
> | width="50" valign="top" | '''Note:'''
> | {{{1}}}
> |}
>  
> ...
>  
> It looks very nice and doesn't show any internal borders around each
> cell.
> But if I use it nested within a wikitable now all of a sudden I see the
> borders in the note.
> This happens if I use the template above for a note or if I were to
> manually nest the table as shown below (so if anyone wanted to try this
> out they wouldn't have to create and save a template).
>  
> So my question is how do I get rid of all of that style info and
> properly nest two tables with different styles?
>  
> Thanks,
> ~Eric
>  
> {| class="wikitable"
> |-
> | valign="top" |
> * click this
> * press that
> * hit okay
>
> {| width="75%" cellpadding=0 cellspacing=0 style="background-color:
> #c1ffc1; border: 1px dashed green; padding: 0px 4px;"
> |-
> | width="50" valign="top" | '''Note:'''
> | Sometimes you have to wait a bit.
> |}
> |
> [[Image:Screenshot 01.jpg|200 px]]
> |-
> | valign="top" |
> * Press Enter
> |
> [[Image:Screenshot 02.jpg|200 px]]
> |-
> | valign="top" |
> * fill out form
> * cross your fingers
> * hit enter
> |
> [[Image:Screenshot 03.jpg|200 px]]
> |}
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Bugzilla from sy1234@gmail.com
In reply to this post by Alexis Moinet
On 6/6/06, Alexis Moinet <[hidden email]> wrote:
> FYI, if you are interested by understanding what happens, you can try this code :

Oh I get it.. cool.

{| style="border: 1px dashed black;"
|-
| One border is around the table.
|-
| style="border: 1px solid red;" | One border is around this cell.
|}
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Bugzilla from sy1234@gmail.com
In reply to this post by Frederich, Eric P21322
On 6/6/06, Frederich, Eric  P2173 <[hidden email]> 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.
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Alexis Moinet
In reply to this post by Frederich, Eric P21322
Frederich, Eric P2173 a écrit :
 > I tried with style="border: 0" and it worked, I will change it to border: none; if that is the preferred way.
 > See my new template below.  Now this leads to a new question.  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?

you can add this in common.css (it works, I just tested it)

table.wikitable table td{
        border: none;
}


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Frederich, Eric P21322
In reply to this post by Frederich, Eric P21322
Wow, that worked thanks a lot.  There have been plenty of solutions but this is by far the easiest and most elegant.
So that I understand exactly what is going on...that explicitly says that a table nested inside a wikitable should not have a border?

There is one problem that I have with this solution...
I noticed now that when I nest a wikitable inside of a wikitable that the inner table doesn't have cell borders now and it should.
The solution I am really looking for a way to make a table to look exactly the same whether it is inside of another table or outside by itself.

Here is a table I made and below it I put my common.css

{| class="wikitable"
|-
|
* this is a normal cell in the outer table
| bla || bla
|-
|
'''in this cell is an inner table where each cell has an explicit border'''
{|
|+ Inner Table 1
|-
| style="border: 2px solid red" | 1
| style="border: 2px solid red" | 2
| style="border: 2px solid red" | 3
|-
| style="border: 2px solid red" | 4
| style="border: 2px solid red" | 5
| style="border: 2px solid red" | 6
|-
| style="border: 2px solid red" | 7
| style="border: 2px solid red" | 8
| style="border: 2px solid red" | 9
|}
| bla || bla
|-
|
In this cell is an inner wikitable
which I would think should have a
border on each cell just like the
outer one does.  It doesn't because
we put
<pre>
table.wikitable table td{
  border: none;
}
</pre>
in MediaWiki:Common.css
{| class="wikitable"
|+ Inner Table 2
|-
| 1 || 2 || 3
|-
| 4 || 5 || 6
|-
| 7 || 8 || 9
|}
| bla || bla
|}

Below is my common.css

/* This resolves an issue with CSS not working correctly.  It must be the first entry. */
thisneverworks {
}

table.wikitable, table.prettytable {
 margin: 1em 1em 1em 0;
 background: #f9f9f9;
 border: 1px #aaaaaa solid;
 border-collapse: collapse;
}

table.wikitable th, table.wikitable td, table.prettytable th, table.prettytable td {
 border: 1px #aaaaaa solid;
 padding: 0.2em;
}

table.wikitable th, table.prettytable th {
 background: #f2f2f2;
 text-align: center;
}

table.wikitable caption, table.prettytable caption {
 margin-left: inherit;
 margin-right: inherit;
}

/* the following three lines prevent unwanted borders from showing up in tables that get nested inside of a wikitable */
table.wikitable table td{
  border: none;
}


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alexis Moinet
Sent: Tuesday, June 06, 2006 12:02 PM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] properly nesting tables

Frederich, Eric P2173 a écrit :
 > I tried with style="border: 0" and it worked, I will change it to border: none; if that is the preferred way.
 > See my new template below.  Now this leads to a new question.  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?

you can add this in common.css (it works, I just tested it)

table.wikitable table td{
        border: none;
}


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Alexis Moinet
Frederich, Eric P2173 a écrit :
> Wow, that worked thanks a lot.  There have been plenty of solutions but this is by far the easiest and most elegant.
> So that I understand exactly what is going on...that explicitly says that a table nested inside a wikitable should not have a border?
>  
that explicitly says that a td in a table nested inside a wikitable
should not have a border
> There is one problem that I have with this solution...
> I noticed now that when I nest a wikitable inside of a wikitable that the inner table doesn't have cell borders now and it should.
> The solution I am really looking for a way to make a table to look exactly the same whether it is inside of another table or outside by itself.
>  
Did you ever hear something about a snake biting its own tail ? ;-)

My guess is : "There is a simpler solution somewhere, but it's not a
problem coming from the mediawiki software, it's a css/table problem,
maybe you should ask on a css dedicated forum"

you can possibly do this (but I do NOT recommend you to do so) (by the
way, imbricated tables is a bad idea) :

table table.wikitable th, table table.wikitable td, table
table.prettytable th, table table.prettytable td {
 border: 1px #aaaaaa solid;
}
table table.wikitable th, table table.prettytable th {
 background: #f2f2f2;
 text-align: center;
}
table table.wikitable, table table.prettytable {
 margin: 1em 1em 1em 0;
 background: #f9f9f9;
 border: 1px #aaaaaa solid;
 border-collapse: collapse;
}
table table.wikitable caption, table table.prettytable caption {
 margin-left: inherit;
 margin-right: inherit;
}

BUT if you put a table inside of your wikitable inside of a table inside
of the wikitable, it will have border (see what I meant with the snake ;-) )



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: properly nesting tables

Frederich, Eric P21322
In reply to this post by Frederich, Eric P21322
Yeah, I understand what you mean about a snake biting its own tail.
Again, I know nothing about CSS and I know a very little HTML but I don't think that having a nested table render exactly the way it would if it weren't nested is something big to ask.  I would think this would be the behavior everyone would want....but what do I know.
Thanks for all your help.

~Eric

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alexis Moinet
Sent: Wednesday, June 07, 2006 11:52 AM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] properly nesting tables

Frederich, Eric P2173 a écrit :
> Wow, that worked thanks a lot.  There have been plenty of solutions but this is by far the easiest and most elegant.
> So that I understand exactly what is going on...that explicitly says that a table nested inside a wikitable should not have a border?
>  
that explicitly says that a td in a table nested inside a wikitable
should not have a border
> There is one problem that I have with this solution...
> I noticed now that when I nest a wikitable inside of a wikitable that the inner table doesn't have cell borders now and it should.
> The solution I am really looking for a way to make a table to look exactly the same whether it is inside of another table or outside by itself.
>  
Did you ever hear something about a snake biting its own tail ? ;-)

My guess is : "There is a simpler solution somewhere, but it's not a
problem coming from the mediawiki software, it's a css/table problem,
maybe you should ask on a css dedicated forum"

you can possibly do this (but I do NOT recommend you to do so) (by the
way, imbricated tables is a bad idea) :

table table.wikitable th, table table.wikitable td, table
table.prettytable th, table table.prettytable td {
 border: 1px #aaaaaa solid;
}
table table.wikitable th, table table.prettytable th {
 background: #f2f2f2;
 text-align: center;
}
table table.wikitable, table table.prettytable {
 margin: 1em 1em 1em 0;
 background: #f9f9f9;
 border: 1px #aaaaaa solid;
 border-collapse: collapse;
}
table table.wikitable caption, table table.prettytable caption {
 margin-left: inherit;
 margin-right: inherit;
}

BUT if you put a table inside of your wikitable inside of a table inside
of the wikitable, it will have border (see what I meant with the snake ;-) )



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l