Deprecated: Function set_magic_quotes_runtime() is deprecated in /home4/mfoster/public_html/cb/forums/include/common.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 34
Cross-Browser.com / [xTableHeaderFixed] colspan'd THs

Cross-Browser.com

X Library Forums

You are not logged in.

Announcement

New user registration is currently disabled.

#1 October 29, 2010 12:47:46 pm

theseeker
Member
Registered: December 11, 2009
Posts: 24

[xTableHeaderFixed] colspan'd THs

You probably already know about this, but just in case...

In all of your demos, table #3 (the one with the row of colspan'd THs in the THEAD) is slightly off in most browsers (looks spot on in Chrome but that's it). It must have something to do with the colspans messing up the calcuations. Specifically, it looks like the non-caption table-header rows that are messing things up.

No big deal, but thought you'd want to know.

Offline

 

#2 November 2, 2010 1:48:52 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] colspan'd THs

Hi theseeker,

Yep, I've just about given up on getting them to line up exactly, especially when there are colspan'd THs. You can resize the browser window width slightly and they render differently. It makes for difficult testing, LOL.

Offline

 

#3 November 3, 2010 9:32:07 am

theseeker
Member
Registered: December 11, 2009
Posts: 24

Re: [xTableHeaderFixed] colspan'd THs

Your post jogged my memory about how I was handling this in the fixed table header javascript code that I shared with you earlier. It looks like for spanned columns only, and only in Firefox, I used document.getElementById rather than getComputedStyle.width. I don't remember exactly why I did this, but I'm pretty sure it had something to do with this colspan issue.

Also, as a last step in my code (regardless of browser), I compare the offsetWidth of each header column to it's corresponding non-header column, and then set either the header column width to the width of the non-header column or vice-versa, depending on which is larger. I think that last step solved all of my column lining up issues.

Of course, my code is way different than yours (mine is amateur hour for sure!), so YMMV, but I thought it was worth mentioning.

Offline

 

#4 November 3, 2010 2:22:23 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] colspan'd THs

You've got some interesting ideas there. I'll be trying these as I continue with this. Thanks!

Offline

 

Board footer

Powered by PunBB 1.2.15
Copyright © 2002–2005 Rickard Andersson

Expand Restore Select Format Eval Load