user626528
user626528

Reputation: 14409

Select all cells inside the table

Is it possible to apply style to all td's inside the table having specified ID?

Upvotes: 0

Views: 1828

Answers (1)

Andreas Wong
Andreas Wong

Reputation: 60516

Yes, via descendant selector

#table-id td { background:red }

HTML

<table id="table-id"><tr><td>Hi</td><td>, There</td></tr></table>

fiddle: http://jsfiddle.net/FjpBa/1/

Upvotes: 6

Related Questions