Solved

How to Create a Freeze Pane Table Header using PHP

Posted on 2008-06-20
4
2,404 Views
Last Modified: 2013-12-12
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
Comment
Question by:deharvy
  • 2
4 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 total points
ID: 21834929
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
 
LVL 48

Expert Comment

by:hernst42
ID: 21835013
0
 

Author Comment

by:deharvy
ID: 21835043
Works... except that the header doesn't retain the column width. I can work with this method. Any other method? Just asking.
0
 

Author Comment

by:deharvy
ID: 21835109
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now