title: Horizontal scrolling with sticky div that stays on the left border
body: <p>I have two rows of data (green) and a header (red), which should be visible at all times:</p>
  <p>Check out the example I already have:</p>
  <p><a href="http://jsfiddle.net/j9C8R/33/" rel="nofollow noreferrer">http://jsfiddle.net/j9C8R/33/</a></p>
  <p>Now the red header scrolls away together with the content, but it should stick to where it is now, but scroll vertically with the content (MS Excel style).</p>
  <p>How can this be achieved (preferably with only CSS).</p>
  <p><strong>UPDATE</strong>: It is important that the red headers scroll vertically along with the corresponding content but stick to the left edge when scrolling horizontally.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.main {
    background-color: blue;
    overflow: scroll;
    height: 200px;
    width: 400px;
  }
  
  .row {
    height: 50px;
    overflow: scroll;
    clear: both;
    width: 1000px;
    background-color: yellow;
  }
  
  .sticky,
  .content {
    float: left;
    width: 150px;
    border: 1px solid black;
  }
  
  .sticky {
    background-color: red;
  }
  
  .content {
    background-color: green;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="main"&gt;
    &lt;div class="row"&gt;
      &lt;div class="sticky"&gt;Sticky header A&lt;/div&gt;
      &lt;div class="content"&gt;ContentA&lt;/div&gt;
      &lt;div class="content"&gt;ContentA&lt;/div&gt;
      &lt;div class="content"&gt;ContentA&lt;/div&gt;
      &lt;div class="content"&gt;ContentA&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
      &lt;div class="sticky"&gt;Sticky header B&lt;/div&gt;
      &lt;div class="content"&gt;ContentB&lt;/div&gt;
      &lt;div class="content"&gt;ContentB&lt;/div&gt;
      &lt;div class="content"&gt;ContentB&lt;/div&gt;
      &lt;div class="content"&gt;ContentB&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
      &lt;div class="sticky"&gt;Sticky header C&lt;/div&gt;
      &lt;div class="content"&gt;ContentC&lt;/div&gt;
      &lt;div class="content"&gt;ContentC&lt;/div&gt;
      &lt;div class="content"&gt;ContentC&lt;/div&gt;
      &lt;div class="content"&gt;ContentC&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
      &lt;div class="sticky"&gt;Sticky header D&lt;/div&gt;
      &lt;div class="content"&gt;ContentD&lt;/div&gt;
      &lt;div class="content"&gt;ContentD&lt;/div&gt;
      &lt;div class="content"&gt;ContentD&lt;/div&gt;
      &lt;div class="content"&gt;ContentD&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
      &lt;div class="sticky"&gt;Sticky header E&lt;/div&gt;
      &lt;div class="content"&gt;ContentE&lt;/div&gt;
      &lt;div class="content"&gt;ContentE&lt;/div&gt;
      &lt;div class="content"&gt;ContentE&lt;/div&gt;
      &lt;div class="content"&gt;ContentE&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>