Display Tag: Static Headers - Revisited
I get a fair amount of hits on this site for my Display Tag: Static Headers post. When I originally wrote it, back in August, it didn't work in IE. So I asked the experts. I got a solution from that - split the tables and wrap the data table with a div that has style="height: 400px; overflow: auto". This works in IE, but since it's not easy to hack the HTML that the displaytag generates, this is an awkward solution.
Since my old demo disappeared when I updated struts-resume, I created a new one. This example shows how to do static headers in both IE and Mozilla - and the IE solution actually works in both. It's admittedly ugly, but it works. The major problem with this approach is getting the width of the top (header) cells to match up with the bottom (data) cells. I got them close using "th, td { width: 25%}" in my stylesheet, but that doesn't line them up exactly. If anyone knows of a better solution, let me know and I'll update the demo.
Posted by Jakko Vos on December 04, 2003 at 09:13 PM MST #
Posted by Jakko Vos on December 04, 2003 at 09:40 PM MST #
Posted by James on March 08, 2004 at 10:14 PM MST #
Posted by krishna on August 26, 2008 at 04:42 PM MDT #