Fixed table ranks (expression) applied under IE

Source: Internet
Author: User
Tags relative
This article for you to introduce the use of expression fixed form ranks, this is a kind of application in IE under the fixed ranks of the method, interested friends can learn, hope for everyone to help

This is a method of fixing the ranks in IE. its specific code is as follows:

Copy Code code as follows:




<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >


<html>


<head>


<title> New Document </title>


<style>


. Fixedtitlerow


{


position:relative;


top:expression (THIS.OFFSETPARENT.SCROLLTOP);


z-index:10;


width:80px;


Background-color: #FFCC00;


}


. Fixeddatacolumn


{position:relative;


left:expression (This.parentElement.offsetParent.parentElement.scrollLeft);


Background-color: #E6ECF0;


}


. fixedcolumnandrows{


position:relative;


Top:expression (THIS.OFFSETPARENT.SCROLLTOP);


left:expression (This.offsetParent.scrollLeft);


z-index:20;


width:80px;


Background-color: #FFCC00;


}


Td{word-break:keep-all;}


</style>


</head>


<body>


<div id= "Scrolldiv" style= "width:500"; height:150; Overflow:auto; Cursor:default; Display:inline; Position:absolute; " >


<table width= 100% cellpadding= ' 0 ' cellspacing= ' 0 ' bordercolor= ' lightgrey ' border= ' 1 "style=" Table-layout: Fixed ">


<tr bgcolor= "#FFCC00" style= "FONT-SIZE:12PX; Text-align:center; font-weight:bold;height:25px; " >


<td class= "Fixedcolumnandrows" >header</td>


<td class= "Fixedcolumnandrows" >header</td>


<td class= "Fixedcolumnandrows" >header</td>


<TD class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


<td class= "Fixedtitlerow" >header</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td class= "Fixeddatacolumn" >left</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


<td>--</td>


</tr>


</table>


</body>


</html>


/* This fixed-line method applies only to IE, and is only suitable for situations with a small amount of data. The amount of data is very much a resource-consuming!*/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.