jquery - css for particular table's rows and columns -
i have many html tables , 1 of these named "table1". want give style table only. used:
#table1 tr,th,td { border: 5px solid black; } but when executed, other table's td , tr, th style setted same #table1 's style.
how can give style particular table's td , tr, th only????
you need specify parent th , td
#table1 tr, #table1 th, #table1 td { /* ... */ } otherwise apply style
#table1 tr(alltrinside#table1)th(allthno matter are)td(alltdno matter are)
as side note, on modern browser :any pseudoclass is available (with -moz- , -webkit- prefixes) implemented more consistently write
#table1 :any(tr, th, td) { ... } useful avoid repetition.
Comments
Post a Comment