0

I want to know how to convert a normal html table to be looked like flexigrid. Is it possible to avoid scrolling of headers in the table like flexigrid?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
kbvishnu
  • 14,760
  • 19
  • 71
  • 101

1 Answers1

1

It's possible to fix the head with CSS. It will always stay visible on top.

<table>
 <thead style="position:fixed; top:0px; z-index:42; background:#fff;">
  <tr>
   <th>head cell a</th>
   <th>head cell b</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>1a</td>
   <td>1b</td>
  </tr>
  <tr>
   <td>2a</td>
   <td>2b</td>
  </tr>
  <!-- ... -->
 </tbody>
</table>
Floern
  • 33,559
  • 24
  • 104
  • 119
  • okay. I found this: http://stackoverflow.com/questions/684211/html-table-with-fixed-headers-and-a-fixed-column and this http://stackoverflow.com/questions/673153/html-table-with-fixed-headers – Floern Jan 04 '11 at 11:00
  • This solution is works only in firefox. Not in IE. – kbvishnu Feb 29 '12 at 10:36