title: CSS box-shadow on scrolled content
body: <p>I want to have a div with an inset box-shadow that has scrolled content in it. Unfortunately, the box-shadow doesn't get casted on the elements within the content, but rather on the background, but I want it to cover the content elements as well.</p>
  
  <p>I stumbled upon this solution: <a href="http://jsfiddle.net/HPkd3/" rel="noreferrer">http://jsfiddle.net/HPkd3/</a> (<a href="https://stackoverflow.com/questions/5400130/why-does-a-background-break-a-box-shadow-inset-effect">via</a>). The problem is, I can't get it to work with my scrolled setup; if I position the mask inside the scrolling div, the shadow scrolls away - and if I position it outside of the div, the scrollbar has the shadow cast upon it, which looks weird.</p>
  
  <p>Any ideas how to get this right?</p>
  
  <p>Edit: Some example code: <a href="http://jsfiddle.net/ZSpSS/2/" rel="noreferrer">http://jsfiddle.net/ZSpSS/2/</a></p>
  
  <p>I want the red squares in this example covered with the shadow, while the shadow should be persistent when I scroll through the content.</p>