title: Best practice for applying new CSS classes to legacy data
body: <p>We are working on a legacy application and want to give it a new look. There are many <code>&lt;input type="button" /&gt;</code>, <code>&lt;input type="submit" /&gt;</code>, <code>&lt;input type="reset" /&gt;</code>, etc. scattered throughout almost 200 JSP pages in our web application. None of them have a <code>class="something"</code> value set already.</p>
  
  <p>We have found an interesting CSS which contains a new class definition which will style the aforementioned input types the way we want. I would like to apply these class definitions everywhere, however it seems wrong to me to have to go to each <code>&lt;input&gt;</code> and add <code>class="some_class"</code> to each individual element.</p>
  
  <p>What is the best way to go about this? I could use jQuery and add include script to the top of the header page in do something like <code>$('input[type="submit"]').addClass("some_class")</code>. This minimizes the amount of code I need to modify, but is that the best way?
  I am not familiar enough with CSS to know if it is possible to add a class dynamically using a selector - based on my reading it doesn't seem possible.</p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I have tried this already in our 'default.css':</p>
  
  <p><code>input[type="submit"], input[type="reset", input[type="button"]{
      class : "someclass"
  }</code> </p>
  
  <p>But it doesn't work (I'm assuming class : "someclass" is not actually valid")</p>