title: Margin on every element except last
body: <p>I have 2 lines of CSS for setting margin on every element except the last one. Is there a way to combine it into 1 line?</p>
  
  <p>This is what I have currently(working):</p>
  
  <pre><code>.work img {
      margin-right: 10px;
  }
  
  .work img:last {
      margin-right: 0px;
  }
  </code></pre>
  
  <p>I tried changing it to:</p>
  
  <pre><code>.work img:not(:last) {
      margin-right: 10px;
  }
  </code></pre>
  
  <p>But it is not working? Any idea why?</p>
  
  <p><strong>UPDATE</strong> I have only five images. My other option would be to only have margins on the first four.</p>