title: CSS Inheritance: Overriding parent CSS with a container?
body: <p>I'm having an issue with style inheritance on a project I'm working on at the moment. </p>
  
  <p>The project I'm working on involves me using HTML5, CSS3 other newer standards and features on a codebase that's 12 years old that hasn't been maintained all that well. <em>(For example before I'd even gotten to this issue no HTML5 elements or CSS3 styles could be applied in IE because there wasn't a DOCTYPE)</em></p>
  
  <p>Anyway, onto the problem at hand! The font styles from the main CSS file for the system I'm working in is overriding the styles of the content I'm working with. It's worth noting I'm using a custom compiled version of Twitter Bootstrap and using that for a lot of the new styles, it's been compiled so that all of the elements in the CSS have <code>.bootstrap-container</code> added as a prefix, then the new content I'm adding is then of course wrapped in a div like so: <code>&lt;div class="bootstrap-container"&gt; ... &lt;/div&gt;</code>.</p>
  
  <p>This works for the most part, but the font sizes still mess up on certain elements. Things that are explicitly defined in Bootstrap work fine, like the headers, but say I put a span inside of a header for whatever reason it will use <code>font-size</code> from the main CSS file.</p>
  
  <p>The offending main CSS is:</p>
  
  <pre><code>body, td, tr, div, p, form, input, select, textarea, font {
      color: #333;
      font: 10px verdana, helvetica, sans-serif;
  }
  </code></pre>
  
  <p>The bootstrap CSS that works currently to override it is:</p>
  
  <pre><code>.bootstrap-container * {
      font-family: 'Helvetica Neue', Helvetica, sans-serif;
      font-size: 13px;
  }
  </code></pre>
  
  <p>However this of course poses another problem in that I then have to specify even more override rules to fix other things.</p>
  
  <p>So my question to all of you is how can I override the styles in a better way so that I can pretty much just use Bootstrap as it's meant to be used? If there is a way at all...</p>