473,327 Members | 2,081 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,327 software developers and data experts.

freezing column headers with dropdowns

Hi,

Here's what I'm trying: given an html table, to freeze the column
headers and/or left column in IE. I understand that this is possible
thru style sheets in IE, as suggested in the following:

http://web.tampabay.rr.com/bmerkey/e...olumn-csv.html

http://www.adp-gmbh.ch/web/css/expression.html

However, I've found that these methods donot work on a column that has
dropdowns in it (i.e. select tag with option tags in it). Does anyone
have suggestions on how to get this working for dropdowns?

thanks
Nagender

Here's a snippet that I have:

<html>
<head>
<title>Some Title</title>
<style>

table {
border-collapse : collapse;
table-layout : fixed;
}

td, th {
background-color: #aaaaaa;
border-right : 1px solid #ffffff;
color : #ffffff;
width : 100px;
text-align : center;
}

th.locked_both {
background-color: #88ff88;
font-weight : bold;
top :
expression(document.getElementById('table_containe r').scrollTop);
border-left : 1px solid #ffffff;
position : relative;
z-index : 1
}

th.locked_top {
background-color: #88ff88;
font-weight : bold;
top :
expression(document.getElementById('table_containe r').scrollTop);
position : relative;
z-index : 1
}

#table_container {
width : 300px;
height : 100px;
overflow : scroll;
}

</style>
</head>

<body>

<div id='table_container'>

<table>
<thead>
<tr>
<th class='locked_top'>Number</th>
<th class='locked_top' >English</th>
<th class='locked_top' >French </th>
<th class='locked_top' >German </th>
</tr>
</thead>

<tbody>
<tr>
<td >1</td>
<td >one</td>
<td >un</td>
<td>
<SELECT>
<OPTION VALUE="hello">hello</OPTION>
<OPTION VALUE="world">world</OPTION>
</SELECT>
</td>
</tr>

<tr>
<td >2</td>
<td >two</td>
<td >deux</td>
<td>
<SELECT>
<OPTION VALUE="hello">hello</OPTION>
<OPTION VALUE="world">world</OPTION>
</SELECT>
</td>
</tr>

<tr>
<td >3</td>
<td >three</td>
<td >trois</td>
<td>
<SELECT>
<OPTION VALUE="hello">hello</OPTION>
<OPTION VALUE="world">world</OPTION>
</SELECT>
</td>
</tr>

<tr>
<td >4</td>
<td >four</td>
<td >quattre</td>
<td>
<SELECT>
<OPTION VALUE="hello">hello</OPTION>
<OPTION VALUE="world">world</OPTION>
</SELECT>
</td>
</tr>

<tr>
<td >5</td>
<td >five</td>
<td >penta</td>
<td>
<SELECT>
<OPTION VALUE="hello">hello</OPTION>
<OPTION VALUE="world">world</OPTION>
</SELECT>
</td>
</tr>

<tr>
<td >6</td>
<td >six</td>
<td >hex</td>
<td>
<SELECT>
<OPTION VALUE="hello">hello</OPTION>
<OPTION VALUE="world">world</OPTION>
</SELECT>
</td>
</tr>

</tbody>

</table>

</div>
</body>
</html>

Dec 16 '05 #1
0 4631

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

Similar topics

6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
4
by: Hans Merkl | last post by:
Hi, Is there a way to show the column headers of a GridView control even if there is no data? The only thing I see is the EmptyDataTemplate but I would also like to display the column headers. ...
1
by: ElenaR | last post by:
I need to figure out how to name my column headers in a DataGrid. In VB6, I could write DataGrid1.Columns(0).Caption = "ID". What is the format for VB.NET? Thanks in Advance!
2
by: Job Lot | last post by:
Is there any way of freezing columns in Windows Forms Data Grid control? Thanks
7
by: bearophileHUGS | last post by:
Most of my ideas seem usless or stupid, but I think expressing them here doesn't harm much. This is an idea for Py 3.0, because it's not backward compatible. Dicts and sets require immutable...
2
by: John Walker | last post by:
Hi, We have a datagrid with column headers. If the datagrid has more than say 25 rows the user needs to scroll down to be able to see the rest of the grid. When the user does this the column...
0
by: Phuff | last post by:
I'm trying to do something and its proving tricky. When someone clicks the edit button I don't want to use the standard textbox, so I create a templated column. I need 2 dropdowns and a textbox. ...
6
by: hem | last post by:
Hi, I have the following small program which read password from user after echoing off. But the problem is, it is freezing for some time (not sure about the duration) before going to the next...
14
by: fh217 | last post by:
Hi I have a datasheet with 32 columns, the first 2 columns are frozen and disabled. What I would like to do is as a user tabs thru a row on the sheet is to shift the sheet to the left so it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.