title: Create fixed header table html
body: <p>I am creating a fixed header table, but the header and the data do not seem to be aligned. The table is created dynamically. Here is the sample of the generated html -</p>
  
  <p>What do you think I should do ?</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  
      &lt;title&gt;&lt;/title&gt;
      &lt;style&gt;
          /*spreadsheet*/
  
          .row:nth-child(odd)
          {
              background: rgba(0,0,0,0.05);
          }
          /* Similarly we can define another rule for even */
  
          .bodyTable td
          {
              white-space: normal; /*text-overflow: ellipsis;*/
              overflow: hidden;
              word-spacing: normal;
              font-family: Sans-Serif;
              font-size: 14px;
              text-align: right;
          }
  
          .bodyTable tr
          {
              height: 20px;
          }
  
          .bodyTable tr:hover
          {
              background-color: rgba(0,0,0,0.3);
          }
  
          .headerTable
          {
              text-align: justify;
              vertical-align: middle;
              word-spacing: normal;
              border-spacing: 0px;            
              border-style: solid;
              caption-side: top;
              word-wrap:break-word;
              border-collapse: collapse;
              font-family: Sans-Serif;
              font-size: 10px;
          }
  
          .th
          {
              background-color: Red;
          }
  
          .scroll
          {
              overflow: auto;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="tableTag"&gt;
          &lt;table width="1903px"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;table class="headerTable" width="1878px"&gt;
                          &lt;tr&gt;
                              &lt;th&gt;
                                  sample1
                              &lt;/th&gt;
                              &lt;th&gt;
                                  sample2
                              &lt;/th&gt;
                              &lt;th&gt;
                                  sample3
                              &lt;/th&gt;
                              &lt;th&gt;
                                  sample
                              &lt;/th&gt;
                              &lt;th&gt;
                                  testsample
                              &lt;/th&gt;
                              &lt;th&gt;
                                  column2
                              &lt;/th&gt;
                              &lt;th&gt;
                                  column3
                              &lt;/th&gt;
                              &lt;th&gt;
                                  column4
                              &lt;/th&gt;
  
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td style="text-align: center;"&gt;
                      &lt;div class="scroll" width="1903px" style="height: 200px;"&gt;
                          &lt;table class="bodyTable" border="0" width="1878px" height="200px" style="table-layout: fixed"&gt;
                              &lt;tbody&gt;
                                  &lt;tr class="row"&gt;
                                      &lt;td&gt;
                                          54.29204
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          76.806827
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          31.127742
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          -0.409866
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          2.965601
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          6.696099
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          - 0.947771
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          9.713368
                                      &lt;/td&gt;
  
                                  &lt;/tr&gt;
                                  &lt;tr class="row"&gt;
                                      &lt;td&gt;
                                          72.082179
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          68.104432
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          16.588382
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          - 0.564589
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          5.759212
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          7.916862
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          - 0.706712
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          3.840213
                                      &lt;/td&gt;
  
                                  &lt;/tr&gt;
                              &lt;/tbody&gt;
                          &lt;/table&gt;
                      &lt;/div&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>