473,499 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to create scrollable tables

here is a simple solution to creating a table whose headers are fixed
and whose body scrolls. tested with IE6 and firefox 1.0. the results
vary very subtly, but achieve the same operational effect. the example
below shows only the essential and relevant pieces of the puzzle.

<html>
<head>
<style>
div {
overflow:auto;
height:16.8em;
}
thead tr{ /* IE, but not MZ nor NS */
position:relative;
top:expression(document.all['div1'].scrollTop);
}
table>tbody{ /* MZ and NS, but not IE */
height:16.8em;
overflow:auto;
}
</style>
</head>
<body>
<div id=div1>
<table>
<thead><tr><th>...</th></tr></thead>
<tbody><tr><td>...</td></tr></tbody>
</table>
</div>
</body>
</html>

as we know, in IE6 tbody{height} is misapplied to tr. using the
table>tbody hack hides the property from IE which doesn't understand
the selector. meanwhile, the thead tr relative top deflection is
IE-specific and therefore hidden from MZ and NS.

Jul 21 '05 #1
0 3004

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

Similar topics

6
2014
by: Leo J. Hart IV | last post by:
Hello, I have a table: <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1"> <tr> <td...
7
11636
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header |...
2
3177
by: Mel | last post by:
Scrollable table widget with fixed header is there such thing ? thanks, Mel
25
36319
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
3
2192
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
1
2768
by: Keimo Repo | last post by:
Hello I would need some advice, even just speculations... A customer of ours insists on a couple of customer specific design features for our existing multi-customer web application: - A...
2
4061
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using...
2
1601
by: soeter04 | last post by:
Hey guys, I'm trying to make a scrollable table as follows: table is inside a div that is scrollable, both horiz and vert above that div is another div, containing the table headers. As the...
2
2978
by: binilprasad | last post by:
Hi Am working in project where i have to display a table with fixed header and the body is scrollable.I done this creating two tables and placing them inside a div. I set the top property of...
1
16926
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
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
7386
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...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.