title: How to apply different CSS styles to 2 elements with the same class name?
body: <p>I created a website that has different navigation menus. In 2 menus, I use the same HTML class element.</p>
  
  <p>I have a .css file that styles that class element in 1 menu. However, in another menu, I would like to style the elements differently.</p>
  
  <p>Yes, I know I can rename the class name, but to be consistent with what I have right now in the structure of my markup, and also the fact that the class name is used to style multiple other elements, how would I be able to apply different styles to 2 different elements with the same class name?</p>
  
  <p>Can this be done using some kind of if statement condition in CSS?</p>
  
  <p>For example, in 1.html:</p>
  
  <pre><code>&lt;div class="classname"&gt; Some code &lt;/div&gt;
  </code></pre>
  
  <p>In 2.html:</p>
  
  <pre><code>&lt;div class="classname"&gt; Some different code &lt;/div&gt;
  </code></pre>
  
  <p>Since I just want to style this "one" element differently in 2.html, can I just add an id attribute along with the class attribute, and use both the id and class and somehow as the selector?</p>
  
  <p>Once again, I would not like to remove the class name at all, if possible.</p>
  
  <p>Thanks!</p>