0

Suppose I have different views. They have some common parts and some specific ones. Can I make my code clearer?

.View1 th, td { padding: 5px; } 
.view2 th, td { padding: 5px; }

I've looked through different resources but haven't found anything proper.

Something like (if it worked):

.View1 th, td, .View2 th, td { padding: 5px; } 

1 Answers1

2

Your selectors are incorrect. It should be

.View1 th, .View1 td, .View2 th, .View2 td { padding: 5px; }
André Dion
  • 20,347
  • 7
  • 53
  • 59