• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2964
  • Last Modified:

How to Create a Freeze Pane Table Header using PHP

I have a PHP page that has a HTML table. I'd like my header to be a freeze pane (similar to how it works in Excel).

Can someone provide a PHP code example of how this could work?
0
deharvy
Asked:
deharvy
  • 2
1 Solution
 
RoonaanCommented:
You would create two tables. The first is the header. The second is within a div with overflow auto:

<table> ... your header ... </table>
<div style="height:200px;overflow:auto">
<table>
.. your content ..
</table>
</div>

Kind regards

-r-
0
 
hernst42Commented:
0
 
deharvyAuthor Commented:
Works... except that the header doesn't retain the column width. I can work with this method. Any other method? Just asking.
0
 
deharvyAuthor Commented:
Roonaan, I didn't see the post by hernst..... I have to check that out. But for your solution, it works using 2 tables but doesn't retain column width. I'll try to 2nd solution and will get back to you. Thanks for your quick response.
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now