View Full Version : Freeze Pane in HTML Table

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?

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

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?

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.

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.


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?

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">
<style type="text/css">
tbody {
<table border="1">
<tr><th>Column Head 1</th></tr>
<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>
</html>I have yet to find a way to move the scroll-bar out of the table-rows.

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



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:


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