javascript - Adding a fixed header to a dynamic table -
i find myself in need of assistance again, stack overflow.
essentially have table uses angularjs populate various rows data. length of said data changes , such size of table headers changing fit.
my issue having fixed header stays constant in regards size of table body. it's table similar 1 shown in plnkr.
any ideas appreciated including javascript.
<thead> <tr> <th class="statwidth"><span ng-click="setorderproperty('a')"></span></th> <th>r<span ng-click="setorderproperty('b')"></span></th> <th>s<span ng-click="setorderproperty('c')" class="glyphicon glyphicon-chevron-down pull-right"></span></th> <th>d<span ng-click="setorderproperty('d')" class="glyphicon glyphicon-chevron-down pull-right"></span></th> <th>o<span ng-click="setorderproperty('e')" class="glyphicon glyphicon-chevron-down pull-right"> </span></th> <th>st<span ng-click="setorderproperty('f')"></span></th> </tr> </thead>
after table tag can use col element.
for example, 3 columns:
<table> <colgroup> <col style="width:40%"> <col style="width:30%"> <col style="width:30%"> </colgroup> <tbody> ... </tbody> </table>
i arrange fiddle: https://jsfiddle.net/pgh6o54z/
Comments
Post a Comment