Wilson Wilson - 5 months ago 30
CSS Question

Easy styling of all Td's in a table or in a div

Is there a way I can use one category to stylize all of my table cells? I cant just use



because I have another table on the same page that I don't want the same style on. The table I want to stylize has around 40 cells, so is there a way to collectively style them short of copy-pasting a class or id 40 times?


Put a selector on the table tag:

<table class="my-special-table">

table.my-special-table td { style it up! }