title: CSS: styling when element has two classes
body: <p>I have been looking at the <a href="http://www.w3.org/TR/CSS2/selector.html" rel="noreferrer">w3 page on css selectors</a> and have not found any promising leads, so I thought I would ask...</p>
  
  <p>Is there a way to style a single element with two classes differently than if it was one class? </p>
  
  <p>Example:</p>
  
  <pre><code>&lt;a class="foo"&gt;Red&lt;/a&gt;
  &lt;a class="bar"&gt;Yellow&lt;/a&gt;
  &lt;a class="foo bar"&gt;Orange&lt;/a&gt;
  
  a.foo { color:red; }
  a.bar { color:yellow; }
  a.foo.bar { color:orange; }
  </code></pre>