Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    wac is offline
    Regular Coder wac's Avatar
    Join Date
    Sep 2002
    Cary, North Carolina, USA
    Thanked 0 Times in 0 Posts

    align table header with scrollable table body

    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.
    Attached Images Attached Images
    Wayne Christian

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Minneapolis, MN
    Thanked 65 Times in 56 Posts
    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 and it's css, maybe it'll work for you...


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts