html - Freezing Top Row of a table for website -


i using tableizer convert excel worksheet html code paste website. i'm trying make table scrollable. can't figure out or how insert options listed here: freezing/fixing top header row of table

can help??

here code tableizer.com

table.tableizer-table {    border: 1px solid #ccc; font-family: arial, helvetica, sans-serif;    font-size: 12px;    text-align:center;  }   .tableizer-table td {    padding: 4px;    margin: 3px;    border: 1px solid #ccc;    text-align:center;  }     .tableizer-table th {    background-color: #c61f13;     color: #fff;    font-weight: bold;    text-align:center;  }
<table class="tableizer-table">    <tr class="tableizer-firstrow"><th width="5%">district</th><th width="5%">dlr code</th><th width="20%">dealer name</th><th width="5%">kia cpo volume obj</th><th width="5%">current standings</th><th width="5%">enrolled</th><th width="5%">to go</th></tr>    <tr><td>ce01</td><td>il001</td><td>arlington kia in palatine</td><td>30 </td><td>8</td><td>yes</td><td>22</td></tr>    <tr><td>ce01</td><td>il003</td><td>liberty kia</td><td>30 </td><td>2</td><td>yes</td><td>28</td></tr>    <tr><td>ce01</td><td>il035</td><td>napleton's kia of elmhurst</td><td>32 </td><td>11</td><td>yes</td><td>21</td></tr>    <tr><td>ce01</td><td>il036</td><td>rock river kia</td><td>30 </td><td>0</td><td>no</td><td>30</td></tr>    <tr><td>ce01</td><td>il051</td><td>raymond kia</td><td>30 </td><td>3</td><td>yes</td><td>27</td></tr>    <tr><td>ce01</td><td>il054</td><td>gerald kia of naperville</td><td>30 </td><td>16</td><td>yes</td><td>14</td></tr>    <tr><td>ce01</td><td>il057</td><td>gary lang kia</td><td>30 </td><td>11</td><td>yes</td><td>19</td></tr>    <tr><td>ce01</td><td>il058</td><td>classic kia</td><td>30 </td><td>2</td><td>yes</td><td>28</td></tr>    <tr><td>ce01</td><td>il060</td><td>grossinger kia</td><td>30 </td><td>0</td><td>yes</td><td>30</td></tr>    <tr><td>ce01</td><td>il064</td><td>bob rohrman schaumburg kia</td><td>30 </td><td>0</td><td>no</td><td>30</td></tr>    <tr><td>ce01</td><td>il071</td><td>gerald kia of north aurora</td><td>30 </td><td>13</td><td>yes</td><td>17</td></tr>    <tr><td>ce01</td><td>il072</td><td>napleton's elgin kia</td><td>30 </td><td>20</td><td>yes</td><td>10</td></tr>    <tr><td>ce02</td><td>oh003</td><td>halleen kia</td><td>90 </td><td>54</td><td>yes</td><td>36</td></tr>    <tr><td>ce02</td><td>oh016</td><td>waikem kia</td><td>30 </td><td>15</td><td>no</td><td>15</td></tr>    <tr><td>ce02</td><td>oh025</td><td>taylor kia</td><td>37 </td><td>1</td><td>yes</td><td>36</td></tr>  </table>

there no real pretty way this.

you need take want head out of table , new table , style bellow.

all in ending this.

you'll need match column widths though.

if table full page let me know , can show way larger table.

here fiddle

table.tableizer-table {    border: 1px solid #ccc;    font-family: arial, helvetica, sans-serif;    font-size: 12px;    text-align: center;    width: 100%;    height: 300px;    overflow: scroll;  }  .tableizer-table td {    padding: 4px;    margin: 3px;    border: 1px solid #ccc;    text-align: center;  }  .tableizer-table th {    background-color: #c61f13;    color: #fff;    font-weight: bold;    text-align: center;  }  .headtbl {    background-color: red;  }  .container {    position: relative;    width: 100%;  }  .tablearea {    height: 300px;    overflow-y: scroll;  }
<div class="container">    <table class="headtbl">        <tr class="tableizer-firstrow">        <th width="5%">district</th>        <th width="5%">dlr code</th>        <th width="20%">dealer name</th>        <th width="5%">kia cpo volume obj</th>        <th width="5%">current standings</th>        <th width="5%">enrolled</th>        <th width="5%">to go</th>      </tr>    </table>    <div class="tablearea">      <table class="tableizer-table">        <tr>          <td>ce01</td>          <td>il001</td>          <td>arlington kia in palatine</td>          <td>30</td>          <td>8</td>          <td>yes</td>          <td>22</td>        </tr>        <tr>          <td>ce01</td>          <td>il003</td>          <td>liberty kia</td>          <td>30</td>          <td>2</td>          <td>yes</td>          <td>28</td>        </tr>        <tr>          <td>ce01</td>          <td>il035</td>          <td>napleton's kia of elmhurst</td>          <td>32</td>          <td>11</td>          <td>yes</td>          <td>21</td>        </tr>        <tr>          <td>ce01</td>          <td>il036</td>          <td>rock river kia</td>          <td>30</td>          <td>0</td>          <td>no</td>          <td>30</td>        </tr>        <tr>          <td>ce01</td>          <td>il051</td>          <td>raymond kia</td>          <td>30</td>          <td>3</td>          <td>yes</td>          <td>27</td>        </tr>        <tr>          <td>ce01</td>          <td>il054</td>          <td>gerald kia of naperville</td>          <td>30</td>          <td>16</td>          <td>yes</td>          <td>14</td>        </tr>        <tr>          <td>ce01</td>          <td>il057</td>          <td>gary lang kia</td>          <td>30</td>          <td>11</td>          <td>yes</td>          <td>19</td>        </tr>        <tr>          <td>ce01</td>          <td>il058</td>          <td>classic kia</td>          <td>30</td>          <td>2</td>          <td>yes</td>          <td>28</td>        </tr>        <tr>          <td>ce01</td>          <td>il060</td>          <td>grossinger kia</td>          <td>30</td>          <td>0</td>          <td>yes</td>          <td>30</td>        </tr>        <tr>          <td>ce01</td>          <td>il064</td>          <td>bob rohrman schaumburg kia</td>          <td>30</td>          <td>0</td>          <td>no</td>          <td>30</td>        </tr>        <tr>          <td>ce01</td>          <td>il071</td>          <td>gerald kia of north aurora</td>          <td>30</td>          <td>13</td>          <td>yes</td>          <td>17</td>        </tr>        <tr>          <td>ce01</td>          <td>il072</td>          <td>napleton's elgin kia</td>          <td>30</td>          <td>20</td>          <td>yes</td>          <td>10</td>        </tr>        <tr>          <td>ce02</td>          <td>oh003</td>          <td>halleen kia</td>          <td>90</td>          <td>54</td>          <td>yes</td>          <td>36</td>        </tr>        <tr>          <td>ce02</td>          <td>oh016</td>          <td>waikem kia</td>          <td>30</td>          <td>15</td>          <td>no</td>          <td>15</td>        </tr>        <tr>          <td>ce02</td>          <td>oh025</td>          <td>taylor kia</td>          <td>37</td>          <td>1</td>          <td>yes</td>          <td>36</td>        </tr>      </table>    </div>  </div>


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -