title: CSS - Select all elements that are outside of a particular element
body: <p>I would like to select all elements which are outside of my container div using CSS and would like to know how this is done.</p>
  
  <p>I attempted to select all elements which are not container elements - <code>:not(container)</code> - but this results in all elements which are <strong>contained</strong> in the <code>container</code> element to be affected too.</p>
  
  <p>I am looking to do something along the lines of the following:</p>
  
  <blockquote>
    <p>Apply this to all elements OUTSIDE of 'container'<br>
    do NOT include elements contained WITHIN 'container'.</p>
  </blockquote>
  
  <p>How do I achieve this?</p>