Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:45 PM
SmartBloke
Guest
 
Posts: n/a
Default Scrolling tables ?

What I want to be able to do is to present a table (with 3 varying
width columns) as a scrolling list of items.
I can do this by placing the table within a div which has overflow-y
set to scroll - however when the table is scrolled the table header
row scrolls out of view.

Is there a way to format this so that the header is outside of the
scrollable area but still aligns with the (varying width) columns
which contain the table data ?
If each column was a fixed width it would be easy - but I don't see
any way to take varying width columns into account.
  #2  
Old July 20th, 2005, 11:45 PM
Johannes Koch
Guest
 
Posts: n/a
Default Re: Scrolling tables ?

SmartBloke wrote:[color=blue]
> What I want to be able to do is to present a table (with 3 varying
> width columns) as a scrolling list of items.[/color]

<table>
....
<thead>
.... header row ...
</thead>
<tbody>
.... data rows ...
</tbody>
</table>

apply the overflow to tbody.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
  #3  
Old July 20th, 2005, 11:45 PM
DU
Guest
 
Posts: n/a
Default Re: Scrolling tables ?

Johannes Koch wrote:
[color=blue]
> SmartBloke wrote:
>[color=green]
>> What I want to be able to do is to present a table (with 3 varying
>> width columns) as a scrolling list of items.[/color]
>
>
> <table>
> ...
> <thead>
> ... header row ...
> </thead>
> <tbody>
> ... data rows ...
> </tbody>
> </table>
>
> apply the overflow to tbody.[/color]

What you wrote will work only for Mozilla-based (1.2+) browsers.

Cross-browser scrolling tbody
http://www10.brinkster.com/doctorunc...lingTBody.html

DU
  #4  
Old July 20th, 2005, 11:45 PM
SmartBloke
Guest
 
Posts: n/a
Default Re: Scrolling tables ?

DU <drunclear@hotWIPETHISmail.com> wrote in message >[color=blue]
> Cross-browser scrolling tbody
> http://www10.brinkster.com/doctorunc...lingTBody.html
>[/color]

Thanks for your reply, this looked good at first glance, however,
looking deeper it does not allow for variable width columns -
stripping the 'col widths' and the 'table-layout: fixed' from your
code breaks the alignment of the table header and body.

I am generating a table dynamically from a php script - I have no idea
of what the content of the table is going to be so I cannot give
columns widths either relative or absolute - the table must reflow to
accomodate the headings/data.

Possible ?
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles