> I hope it's not the wrong place to ask, but has anyone experience with
> scrolling HTML tables ?
> According http://www.w3schools.com/tags/tag_thead.asp
> "The thead, tfoot and tbody elements enable you to group rows in a table.
> When you create a table, you might want to have a header row, some rows
> with data, and a row with totals at bottom.
> This division enables browsers to support scrolling of table bodies
> independently of the table header and footer."
> I don't want to reinvent the wheel in own software.
> Or is it better to ignore these tags because of bad browser support ?
> Thanks, Cor
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
C.R.Vegelin wrote:
> I hope it's not the wrong place to ask, but has anyone experience with scrolling HTML tables ?
It's not really a PHP question, and while personally I don't care, you
ought to keep on-topic to avoid retribution from the "if it isn't PHP,
it shouldn't be talked about" list nazis.
> According
http://www.w3schools.com/tags/tag_thead.asp > "The thead, tfoot and tbody elements enable you to group rows in a table.
> When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom.
> This division enables browsers to support scrolling of table bodies independently of the table header and footer."
Sadly no browser works like this. You have to remember that the W3C
recommendations are just that, recommendations, as to how the client
should render the controls. I don't know of any browser that will
automatically keep a table header/footer inline and allow only the
scrolling of the content region. Mind you, I've never seen a browser
allow for pop-out rendering of select list optgroups either.
In short, you'll need to fake it, and CSS is your friend in this regard.
So best to ask on a dedicated CSS list.
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"
-----------------------------------------------Reply-----------------------------------------------
On Thu, May 10, 2007 11:45 am, C.R.Vegelin wrote:
> I hope it's not the wrong place to ask, but has anyone experience with
> scrolling HTML tables ?
Actually, it *is* the wrong place to ask... :-v
> According
http://www.w3schools.com/tags/tag_thead.asp > "The thead, tfoot and tbody elements enable you to group rows in a
> table.
> When you create a table, you might want to have a header row, some
> rows with data, and a row with totals at bottom.
> This division enables browsers to support scrolling of table bodies
> independently of the table header and footer."
> I don't want to reinvent the wheel in own software.
> Or is it better to ignore these tags because of bad browser support ?
I've never seen any browser do anything useful with these goofy tags...
But the Designers seem to luv them...
If you really want scrolling, you'd better put them in a DIV or
IFRAME, I think.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
-----------------------------------------------Reply-----------------------------------------------
I usually say go ahead and use thead and tbody for semantic completeness. If
you're doing anything funky with Javascript, then you can "group" table rows
by having multiple table bodies (yes, that's legal!) and then operate on each
tbody separately.
Don't waste time with tfoot. It's broken. Completely. The W3C had this
brilliant idea to require tfoot to go before tbody, so if you have a footer
row it appears before the body unless you have a browser that knows to shift
it to the end of the table, out of lexical order. Such a browser does not
exist. It's completely backward-incompatible. It's one of the dumbtest
things the W3C has ever done.
But yeah, tbody and thead are fine, go ahead and use those. :-) If nothing
else they're useful for when you start manipulating the table with
Javascript.
On Sunday 13 May 2007, Richard Lynch wrote:
> On Thu, May 10, 2007 11:45 am, C.R.Vegelin wrote:
> > I hope it's not the wrong place to ask, but has anyone experience with
> > scrolling HTML tables ?
> Actually, it *is* the wrong place to ask... :-v
> > According http://www.w3schools.com/tags/tag_thead.asp
> > "The thead, tfoot and tbody elements enable you to group rows in a
> > table.
> > When you create a table, you might want to have a header row, some
> > rows with data, and a row with totals at bottom.
> > This division enables browsers to support scrolling of table bodies
> > independently of the table header and footer."
> > I don't want to reinvent the wheel in own software.
> > Or is it better to ignore these tags because of bad browser support ?
> I've never seen any browser do anything useful with these goofy tags...
> But the Designers seem to luv them...
> If you really want scrolling, you'd better put them in a DIV or
> IFRAME, I think.
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
--
Larry Garfield AIM: LOLG42
l
@garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson