uxair
02-07-2007, 06:54 AM
Below is the code in which I've a static grid-header, this is working fine but the issue is that whenever user scrolls down, the rows that r scrolled upwards can be seen through the grid headers.
so, is there a way I could set the border by which the scrolled data could not be seen through the transparebt borders.
<html>
<head>
<STYLE>
thead th
{ top: expression(document.getElementById("tbl-container").scrollTop-2);z-index:20;position:relative;
}
</STYLE>
<title>Lock Columns, Column Locking, Freeze Columns in HTML
Tables</title>
</head>
<div id="tbl-container"; STYLE="width: 940px; height: 100px; overflow:auto;">
<table id="tbl"; STYLE="table-layout: fixed;">
<thead>
<tr height=20px; STYLE="color:Navy; background-color : #a6b7FF;">
<th rowspan=2; STYLE="width:100px">Customer Name</th>
<th rowspan=2; STYLE="width:100px">Customer Address</th>
<th colspan=3; STYLE="width:240px">Ready Exposure</th>
<th colspan=3; STYLE="width:240px">Future Exposure</th>
<th rowspan=2; STYLE="width:60px">Share Type</th>
<th rowspan=2; STYLE="width:100px">Cash</th>
<th rowspan=2; STYLE="width:100px">Auto Sell Status</th>
</tr>
<tr height=20px; STYLE="color:Navy; background-color : #a6b7FF;">
<th>Allowed</th>
<th>Used</th>
<th>Diff in Exposure</th>
<th>Allowed</th>
<th>Used</th>
<th>Diff in Exposure</th>
</tr>
</thead>
<tbody>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student01</td>
<td>Languages</td>
<td>male</td>
<td>80</td>
<td>70</td>
<td>75</td>
<td>80</td>
<td>50</td>
<td>Max. Loss</td>
<td>50,000</td>
<td>Enable</td>
</tr>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student02</td>
<td>Mathematics</td>
<td>male</td>
<td>90</td>
<td>88</td>
<td>100</td>
<td>90</td>
<td>10</td>
<td>Min. Price</td>
<td>150,000</td>
<td>Disable</td>
</tr height=20px;>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student03</td>
<td>Languages</td>
<td>female</td>
<td>85</td>
<td>95</td>
<td>80</td>
<td>85</td>
<td>40</td>
<td>Max. Profit</td>
<td>100,000</td>
<td>Postponed</td>
</tr>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student03</td>
<td>Languages</td>
<td>female</td>
<td>85</td>
<td>95</td>
<td>80</td>
<td>85</td>
<td>40</td>
<td>Max. Profit</td>
<td>100,000</td>
<td>Postponed</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
so, is there a way I could set the border by which the scrolled data could not be seen through the transparebt borders.
<html>
<head>
<STYLE>
thead th
{ top: expression(document.getElementById("tbl-container").scrollTop-2);z-index:20;position:relative;
}
</STYLE>
<title>Lock Columns, Column Locking, Freeze Columns in HTML
Tables</title>
</head>
<div id="tbl-container"; STYLE="width: 940px; height: 100px; overflow:auto;">
<table id="tbl"; STYLE="table-layout: fixed;">
<thead>
<tr height=20px; STYLE="color:Navy; background-color : #a6b7FF;">
<th rowspan=2; STYLE="width:100px">Customer Name</th>
<th rowspan=2; STYLE="width:100px">Customer Address</th>
<th colspan=3; STYLE="width:240px">Ready Exposure</th>
<th colspan=3; STYLE="width:240px">Future Exposure</th>
<th rowspan=2; STYLE="width:60px">Share Type</th>
<th rowspan=2; STYLE="width:100px">Cash</th>
<th rowspan=2; STYLE="width:100px">Auto Sell Status</th>
</tr>
<tr height=20px; STYLE="color:Navy; background-color : #a6b7FF;">
<th>Allowed</th>
<th>Used</th>
<th>Diff in Exposure</th>
<th>Allowed</th>
<th>Used</th>
<th>Diff in Exposure</th>
</tr>
</thead>
<tbody>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student01</td>
<td>Languages</td>
<td>male</td>
<td>80</td>
<td>70</td>
<td>75</td>
<td>80</td>
<td>50</td>
<td>Max. Loss</td>
<td>50,000</td>
<td>Enable</td>
</tr>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student02</td>
<td>Mathematics</td>
<td>male</td>
<td>90</td>
<td>88</td>
<td>100</td>
<td>90</td>
<td>10</td>
<td>Min. Price</td>
<td>150,000</td>
<td>Disable</td>
</tr height=20px;>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student03</td>
<td>Languages</td>
<td>female</td>
<td>85</td>
<td>95</td>
<td>80</td>
<td>85</td>
<td>40</td>
<td>Max. Profit</td>
<td>100,000</td>
<td>Postponed</td>
</tr>
<tr height=20px; STYLE="background-color: #D6E7FF;">
<td>Student03</td>
<td>Languages</td>
<td>female</td>
<td>85</td>
<td>95</td>
<td>80</td>
<td>85</td>
<td>40</td>
<td>Max. Profit</td>
<td>100,000</td>
<td>Postponed</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>