CSS3 selecting nested tables using :nth selectors -
i have set mark up. here's link. i'm having trouble figuring out how select tables within table individually. need select tr
, td
of nested tables using :nth selectors.
based on markup, following css should you're after. if read question correctly is...
table tr:nth-child(4) td:nth-child(1) table{background-color:#f0f;} table tr:nth-child(4) td:nth-child(2) table{background-color:#0ff;}
this selects table row contains 2 inner tables, selects each table.
a better approach of course use divs ids/class names. tables should used tabular data, not layout.
your fiddle updated
Comments
Post a Comment