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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -