Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Freezing first row and first column of a table with no performance issues

Posted on 2006-11-03
4
Medium Priority
?
3,703 Views
Last Modified: 2008-01-09
Hi,

I have one JSP page in that rows are arround 200 and column ranges from 4 to 100. when i am freezing first row of my table i have no performance issue even though how many columns get increased but as i am freezing first column of a table page is getting slower
while scrolling right.

This thing i am doing by using styleSheet code which i have pasted below

<style>
 
/* Setting the width and height of table througn DIV tag */
div#tbl-container {
  width:70%;
  height:70%;
 overflow: auto;
}
 
thead th, thead th.locked {
position:relative;
cursor:default;
}
 
/* This block of code will Freeze the header of table */
thead th {
left: expression(document.getElementById("tbl-container").scrollLeft); /* IE5+ only */
}
 
</style>

Since it is very urgent for me. Please suggest me ASAP.

Thanks,
Ashish
0
Comment
Question by:autoknowledge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 1000 total points
ID: 17865672
For browsers other than MSIE5 you might consider using position: fixed;  so that the CSS itself doesn't contain such an expression.  (I'm not familiar with this expression(.scrollLeft) business, but it seems like it requires actively recalculating where the th should begin, and it strikes me that it can't be terribly efficient.
0
 
LVL 30

Assisted Solution

by:VirusMinus
VirusMinus earned 1000 total points
ID: 17865908
what sort of data is in the first row and column? position: fixed, or alternative body, html 100% with absolute for MSIE could do what you're after:

see examples here: http://tagsoup.com/cookbook/css/fixed/#gtev6-demos
also: http://www.divinentd.com/experiments/emulating-position-fixed.html
and: http://www.howtocreate.co.uk/fixedPosition.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question