473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

TABLE question

I have several pages with tables that have data-driven content. Sometimes
the tables can get quite large. What I want to do is have the header (with
column nmaes) remain stationary while the body is scrollable. In the MSDN
documentation for TFOOT, it states that this element can be used in such a
scenario. But I am unable to find any example of how to accomplish this. Can
anyone point me in the right direction? TIA!
Jun 17 '06 #1
6 1483
Gazing into my crystal ball I observed "Ron Hinds" <bi***@microsoft.com>
writing in news:3J*************@fe06.lga:
I have several pages with tables that have data-driven content.
Sometimes the tables can get quite large. What I want to do is have
the header (with column nmaes) remain stationary while the body is
scrollable. In the MSDN documentation for TFOOT, it states that this
element can be used in such a scenario. But I am unable to find any
example of how to accomplish this. Can anyone point me in the right
direction? TIA!


Very few, if any, browser have implemented that. If you Google you can
find various methods, frames, javascript, javascript/CSS, etc.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jun 18 '06 #2
Ron Hinds wrote:
I have several pages with tables that have data-driven content. Sometimes
the tables can get quite large. What I want to do is have the header (with
column nmaes) remain stationary while the body is scrollable.


The basic technique is, in HTML:

<table>
<thead>
<tr><!-- header row --></tr>
<!-- perhaps more rows of headers -->
</thead>
<tfoot>
<!-- yes, TFOOT comes before TBODY -->
<tr><!-- footer row --></tr>
<!-- perhaps more rows of footers -->
</tfoot>
<tbody>
<tr><!-- data line 1 --></tr>
<tr><!-- data line 2 --></tr>
<tr><!-- data line 3 --></tr>
<!-- etc -->
</tbody>
</table>

with the following CSS:

TBODY { height: 10em; overflow: auto; }

Basic technique can be seen here:
http://examples.tobyinkster.co.uk/table-tricks/scroll

Works in very few browsers, though it degrades very well in those
browsers that doesn't support it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jun 18 '06 #3

Toby Inkster wrote:
Ron Hinds wrote:
I have several pages with tables that have data-driven content. Sometimes
the tables can get quite large. What I want to do is have the header (with
column nmaes) remain stationary while the body is scrollable.
[snip] http://examples.tobyinkster.co.uk/table-tricks/scroll

Works in very few browsers, though it degrades very well in those
browsers that doesn't support it.


Which ones does it work in? (Appears to work in Firefox 1.5, but I
don't
have that many other browsers available locally right now...)

Jun 21 '06 #4
RC
Ron Hinds wrote:
I have several pages with tables that have data-driven content. Sometimes
the tables can get quite large. What I want to do is have the header (with
column nmaes) remain stationary while the body is scrollable. In the MSDN
documentation for TFOOT, it states that this element can be used in such a
scenario. But I am unable to find any example of how to accomplish this. Can
anyone point me in the right direction? TIA!


Below codes will solve 50% problem, only works in
Netscape and Firefox, and is not work in IE.
You scroll the vertical scroll bar, header will stay on top.
But the horizontal scroll bar isn't work the way you wish for.
<html><head><title>scroll table</title>
<style type="text/css">
tbody { width: 80%; height: 30em; overflow: scroll; }
</style></head><body>

<table border="1">
<thead>
<tr><th>...</th>..... </tr>
</thead>

<tbody>
<tr><td>...</td>.... </tr>
.....
<tr><td>...</td>.... </tr>
</tbody>

<tfoot>
<tr><th>....</th>.... </tr>
</tfoot>
</table></body></html>
Jun 21 '06 #5
dstone wrote:
Toby Inkster wrote:
http://examples.tobyinkster.co.uk/table-tricks/scroll

Works in very few browsers, though it degrades very well in those
browsers that doesn't support it.


Which ones does it work in?


IIRC pretty much any version of Gecko (except perhaps the very early
betas), but not much else.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jun 24 '06 #6
In message <n8************@ophelia.g5n.co.uk>, Toby Inkster
<us**********@tobyinkster.co.ukwrites

[thead - tfoot -tbody]
>Works in very few browsers, though it degrades very well in those
browsers that doesn't support it.
Netscape 4.7 mangles it, if anyone still cares about that.

Now, if only browsers would automatically decide how much of the body to
show, given the size of the window in use...

--
Andy Mabbett
Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>

Free Our Data: <http://www.freeourdata.org.uk>
Jul 6 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: A. Wiebenga | last post by:
Hi all! I am currently involved in a project in which I am supposed to write a XSLT-transformation sheet for some XML data. I will outline the situation first: I've got one large XML file...
1
by: Eric | last post by:
Hello, I'm sure your all tired of these "alignment" question, but please endure mine. Question. Simple put: What makes a table sit beside another table, as oppose to going down below it. ...
4
by: serge | last post by:
I ran into a table that is used a lot. Well less than 100,000 records. Maybe not a lot of records but i believe this table is used often. The table has 26 fields, 9 indexes but no Primary Key at...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
3
by: CAD Fiend | last post by:
Hello, I have a land development project that has a many-to-many relationship. I have ONE question regarding table structures, and ONE question on how to make a Form with two Subforms, below. ...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
1
by: LurfysMa | last post by:
I am working on an electronic flashcard program. Most of the subjects are simple lists of questions and answers. Those seem to be working. Some of the "subjects" have "categories" of questions. ...
9
by: sck10 | last post by:
Hello, I am building a web form that will be used to gather information for marketing plans. The form will have 15 questions which must be answered. Each question can have large blocks of text....
2
by: mmitchell_houston | last post by:
I'm working on a .NET project and I need a single query to return a result set from three related tables in Access 2003, and I'm having trouble getting the results I want. The details: ...
2
by: servantofone | last post by:
I'm running Access 2003 on Windows XP. This is more of a developmental/implementation type of question. I have a form which requires answers to 35 different questions. All questions are answered...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.