HTML Table: Fixed column and row header - column offset using <center>

In a table there are column header and row headers.   The first row displayed in the table should be fixed that is when you scroll the table vertically the top row remains at the top.   The first column also needs to be fixed; that is, when you scroll horizontaly the first column remains at the far left potiion.

Using multiple table solution supplied :
http://www.cubido.at/Portals/7/docs/Blog/Karin/HTML%20and%20Javascript/ResizeColumns/Table.htm

This sample fails to align the column headers correctly (offset by 1/2 the scrollbar width) when I use <center> to center the table (and any other elements i desire to have on the form).
e.g. by encasing the sample in the following form
<form>
<center>

               <h1>Fixed Headers (resize window to view scrollbars)</h1>
               <table border=0 cellspacing=0 cellpadding=0 width=80% >
               <tr><td>
............... sample coding of scrollable table
              </td></tr>
              </table>
</center>
</form>    



intellias_netAsked:
Who is Participating?
 
gamebitsConnect With a Mentor Commented:
Is this what you are looking for

http://www.newgamebits.com/TEST/EE/Table.htm
0
 
Jason WatkinsIT Project LeaderCommented:
Why not use a CSS, instead of fixed formatting?

http://www.htmlcenter.com/tutorials/tutorials.cfm/61/css/2/

/F
0
 
intellias_netAuthor Commented:
The issue was adding fixed by:
<td  align="left">  <--- added alignment
<div class="headerRow">
Also making sure that alignment of the text was consistant from column headers and table body.
                  
0
 
intellias_netAuthor Commented:
P.S. Ohter solutions using CSS fo fix headers are convient; however, select elements will not respond to z order and will overlay the fixed headers.  Additionally the calculations of fixed headers using CSS expression has a nast habbit of locking up CPU time in certain situation causing the calculation of offsetWidth/Heights to take extrordinary time.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.