title: How to make Scrollable Table with fixed headers using CSS
body: <p>I want to make header of my table fixed.Table is present inside the scrollable div.Please see my code here:    <a href="http://jsfiddle.net/w7Mm8/114/" rel="noreferrer">http://jsfiddle.net/w7Mm8/114/</a> kindly suggest me the solution to this.</p>
  
  <p>Thanks</p>
  
  <p><strong>My Code:</strong></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-html lang-html prettyprint-override"><code>&lt;div style="position: absolute; height: 200px; overflow: auto; "&gt;
      &lt;div style="height: 250px;"&gt;
          &lt;table border="1"&gt;
              &lt;th&gt;head1&lt;/th&gt;
              &lt;th&gt;head2&lt;/th&gt;
              &lt;th&gt;head3&lt;/th&gt;
              &lt;th&gt;head4&lt;/th&gt;
              &lt;tr&gt;
                  &lt;td&gt;row 1, cell 1&lt;/td&gt;
                  &lt;td&gt;row 1, cell 2&lt;/td&gt;
                  &lt;td&gt;row 1, cell 2&lt;/td&gt;
                  &lt;td&gt;row 1, cell 2&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;row 2, cell 1&lt;/td&gt;
                  &lt;td&gt;row 2, cell 2&lt;/td&gt;
                  &lt;td&gt;row 1, cell 2&lt;/td&gt;
                  &lt;td&gt;row 1, cell 2&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>