• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSS Expressions performance

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following CSS expressions being used within style sheet

Top: expression(document.getElementById("griddatatable").scrollTop-2); position: relative; z-index: +10;}

These are being used to make the table columns freeze while scrolling horizontally. But this as expected is causing a huge performance issue.

I want to know how I can optimize such a expression or if there is any other alternative to this.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
expressions are very slow and there is really nothing you can do. You can try to put the document.getElementById("griddatatable").scrollTop into a JS variable on the page and see if the speed improves.

Eric
 
Puneet Agarwal
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting Syntax Error in IE when I am trying to use the following style

.griddatatable-header{ height:10px; background-color:#E4E3E3; border-width:1px; font-size: 11px; font-weight: bold; text-align: left; overflow:hidden; Top: expression(if (!window["grid"]){window["grid"]=document.getElementById("griddatatable")}window["grid"].scrollTop-2); position: relative;}

I dont get the syntax error when I use the following style:

.griddatatable-column-scroll{ height:10px; background-color:#E4E3E3; border-width:1px; font-size: 11px; font-weight: bold; text-align: left; overflow:hidden; Top: expression(document.getElementById("griddatatable").scrollTop-2); position: relative;}

The syntax error comes when page is being loaded.
 
reply
    Bookmark Topic Watch Topic
  • New Topic