View Full Version : align table header with scrollable table body

03-04-2005, 10:30 PM
Because IE doesn't properly render CSS2, I can't use the table header, body, footer markup to create a scrollable body with the header aligned. I basically have two tables which I attempt to line up but I'm having a hard time getting things to line up. I think its because the table body cell data can be wider, forcing it to wrap and recalculate the cell widths, while the header is static (only one row). I really don't want to do goofy tricks like trying to find the widest cell in each column and copy that into a hidden header row.
Has anyone done something like this and gotten things to line up properly all the time? In general, things line up for me, but sometimes which the browser window is resized, the alignment gets thrown off. I'll attach to examples (one good, the other bad). The difference between the good alignments and the bad alignment is that the browser window was resized horizontally.

03-04-2005, 11:06 PM
I've done this a few times for calendars... the only thing I found would work is to keep everything as fixed as possible, so resizing won't kill the layout. Check out this site (http://cathyrivers.com/shows/) and it's css (http://cathyrivers.com/css/style.css), maybe it'll work for you...