...

View Full Version : Freeze Pane in HTML Table



jhahn
10-21-2004, 08:19 PM
Looking for a way to freeze the header row and the leftmost column of a table that is too big for a browser window. :confused: Any ideas or sample sites?

Kor
10-22-2004, 08:38 AM
<td>
<div style="width:100px;height:150px;overflow:auto">
...content of cell...
</div>
</td>

Will keep the cell at a 100X150 px dimention and give a scroll bar automatically if the contend bypass the size. Is this what u want?

jhahn
10-22-2004, 02:26 PM
Thanks, but that's not what I'm looking for. In an Excel spreadsheet you can freeze all of row 1 and all of column A so that when you scroll to other parts of the spreadsheet, row 1 and column A stay put, allowing you to still see the column and row labels. I'm looking for a way to do that with HTML/JavaScript.

A1ien51
10-22-2004, 02:37 PM
You need two seperate tables with the second table in a scrollable div and the first table as the header.

Eric

Kor
10-22-2004, 03:59 PM
aha...<iframe> solution comes to my mind this moment (amongst others)... but this would be a simplier one...Couldt this be a proper solve for u?

hemebond
10-23-2004, 01:11 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>46406</title>
<style type="text/css">
tbody {
height:4em;
overflow:auto;
}
</style>
</head>
<body>
<table border="1">
<thead>
<tr><th>Column Head 1</th></tr>
</thead>
<tfoot></tfoot>
<tbody>
<tr><td>Data 1</td></tr>
<tr><td>Data 2</td></tr>
<tr><td>Data 3</td></tr>
<tr><td>Data 4</td></tr>
<tr><td>Data 5</td></tr>
<tr><td>Data 6</td></tr>
<tr><td>Data 7</td></tr>
<tr><td>Data 8</td></tr>
<tr><td>Data 9</td></tr>
</tbody>
</table>
</body>
</html>I have yet to find a way to move the scroll-bar out of the table-rows.

A1ien51
10-23-2004, 03:05 AM
This is something that I never finished:

http://www10.brinkster.com/a1ien51/customize/ie_idea.html

Eric

jhahn
10-25-2004, 01:12 PM
Thanks for all the help! I found what I was looking for though. This site has a great example:

http://web.tampabay.rr.com/bmerkey/examples/locked-column-csv.html

chippy
11-27-2004, 07:34 AM
Can a table created in Open Office or even Excell be imported into this ....without having to go server side



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum