[Mediawiki-l] properly nesting tables

Frederich, Eric P2173 eric.frederich at siemens.com
Thu Jun 8 11:53:45 UTC 2006


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: mediawiki-l-bounces at Wikimedia.org [mailto:mediawiki-l-bounces at Wikimedia.org] 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
MediaWiki-l at Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l



More information about the MediaWiki-l mailing list