467,879 Members | 1,087 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,879 developers. It's quick & easy.

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.
Jul 20 '05 #1
  • viewed: 4394
Share:
3 Replies
SmartBloke wrote:
What I want to be able to do is to present a table (with 3 varying
width columns) as a scrolling list of items.


<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.)
Jul 20 '05 #2
DU
Johannes Koch wrote:
SmartBloke wrote:
What I want to be able to do is to present a table (with 3 varying
width columns) as a scrolling list of items.

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

apply the overflow to tbody.


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

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

DU
Jul 20 '05 #3
DU <dr*******@hotWIPETHISmail.com> wrote in message >
Cross-browser scrolling tbody
http://www10.brinkster.com/doctorunc...lingTBody.html


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 ?
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Roedy Green | last post: by
12 posts views Thread by Jon Paal | last post: by
17 posts views Thread by Jon Paal | last post: by
1 post views Thread by asearle | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.