RESOLVED WONTFIX20799
Formatting <TD> with CSS only in the first deeper level
https://bugs.webkit.org/show_bug.cgi?id=20799
Summary Formatting <TD> with CSS only in the first deeper level
Rüdiger Cordes
Reported 2008-09-12 10:58:31 PDT
I have a table in a table and want to format only the first level of <td>s. Surprisingly it doesnt work in Safari and Firefox 3 either. Here is the code: <HTML> <HEAD> <STYLE type="text/css"> table.m td {border:1px solid #F00} table.n > td {border:1px solid #0C0} table.o * > td {border:1px solid #B0B} table.p tr > td {border:1px solid #B0B} table.q > * > td {border:1px solid #00F} table.r > tr > td {border:1px solid #00F} table.s > > td {border:1px solid #0C0} //strange but last idea ;-) </STYLE> </HEAD> <BODY> <TABLE class=m> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> <TABLE class=n> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> <TABLE class=o> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> <TABLE class=p> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> <TABLE class=q> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> <TABLE class=r> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> <TABLE class=s> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> </BODY> </HTML>
Attachments
Working with table class=a (361 bytes, text/html)
2011-10-21 03:37 PDT, Rüdiger Cordes
no flags
Not working with table (351 bytes, text/html)
2011-10-21 03:39 PDT, Rüdiger Cordes
no flags
Rüdiger Cordes
Comment 1 2008-09-12 11:16:33 PDT
To have something that works: <HTML> <HEAD> <STYLE type="text/css"> table.m td {border:1px solid #F00} table.m td td {border:1px solid #FA0} </STYLE> </HEAD> <BODY> <TABLE class=m> <TR> <TD> <TABLE><TR><TD>innere Tabelle</TD></TR></TABLE> </TD> <TD>Text</TD> </TR> </TABLE> </BODY> </HTML>
Tab Atkins
Comment 2 2011-10-20 19:57:37 PDT
HTML automatically "repairs" tables by wrapping bare <tr>s into a <tbody>, which is why your .r selector didn't work. So the selector you want is "table > tbody > tr > td".
Rüdiger Cordes
Comment 3 2011-10-21 03:37:24 PDT
Created attachment 111932 [details] Working with table class=a When the higher table has a class its working
Rüdiger Cordes
Comment 4 2011-10-21 03:39:05 PDT
Created attachment 111935 [details] Not working with table When the higher table has no class its not working
Rüdiger Cordes
Comment 5 2011-10-21 03:45:51 PDT
What when the higher table has no class the problem persists.
Note You need to log in before you can comment on or make changes to this bug.