Elegant use of the CSS padding property
-
I'm working on making tables look nice in CSS, but I'm running into some difficulties: If I do
td.TD2
{
padding:5px;
}then I get a class for a single cell with the padding space that I want. However, applying the padding property to a tr class or a table class appears to do nothing. Anyway, I'd rather not specify a new class for every single td on the page. Is there an elegant way to make the padding property work for an entire table?
-
I'm working on making tables look nice in CSS, but I'm running into some difficulties: If I do
td.TD2
{
padding:5px;
}then I get a class for a single cell with the padding space that I want. However, applying the padding property to a tr class or a table class appears to do nothing. Anyway, I'd rather not specify a new class for every single td on the page. Is there an elegant way to make the padding property work for an entire table?