Search
Tuesday, March 09, 2010 ..:: Home ::.. Register  Login
 .NET Links Minimize

 Print   
 My Links Minimize

 Print   
 Recent Blog Entries Minimize
Mar 24

Written by: Wil Dobson
3/24/2008 11:28 AM

Want your GridView Headers to remain floating atop while scrolling your data? Do it with CSS!

/* Lock the datagrid header when scrolling */

th {

   position:relative;

   cursor: default;

   /*IE5+ only*/

   top: expression(this.parentElement.parentElement.parentElement.parentElement.scrollTop);

   /*top:<span class='val'> expression(document.getElementById("depositDatagridDiv").scrollTop-<span    class='unit'>2</span>)</span>;*/

   z-index: 99;

}

/* Keeps the header as the top most item. Important for top left item*/

th.locked {   z-index: 200;   }

/* end lock the datagrid header when scrolling */

Copyright ©2008 Wil Dobson

Tags:

  
 PS: Minimize

 Print   
 Sponsors Minimize

Get your own Komets drinking Stein!

Get your KOMETS gear!
Proceeds go for player awards @ the end of each season.

  Quality Geek Gear from GeeksWithGuns.com

We use DiscountASP!! Click to join up!


 Print   
 Facebook Minimize

Wil Dobson's Facebook profile


 Print   
 Blogs Minimize

 Print   
 Manage Blog Minimize
You must be logged in and have permission to create or edit a blog.

 Print   
 Blog Archives Minimize

 Print   
Copyright 2008 by Wil Dobson   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2010 by DotNetNuke Corporation