Click here to Skip to main content
15,895,880 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why the error is giving Validation(CSS 2.1):expression(this.offsetParent.scrollTop)

my cs coading is given below

CSS
<style type="text/css">
.HeaderFreez
{
position:relative ;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}
</style>
Posted
Updated 14-May-12 18:59pm
v2

Sometimes In the CSS Editor of Visual Studio 2005, the expression(offsetParent.scrollTop) will be treated as a invalid value, and will show this invalid values in the Error List.

You can configure the Visual Studio 2005 not to show this error by Tools -> Options -> Text Editor -> CSS -> CSS Specific -> Uncheck "Detect invalid values".

You also can try to put this CSS code to the <style type="text/css"> tags under header section of your page.

I think you are using VS 2005 if yes ,this helps.
 
Share this answer
 
v3
Comments
Janardan Pandey 15-May-12 2:40am    
I am using visual studio 10
Sandeep Mewara 15-May-12 2:47am    
My 5!
member60 15-May-12 3:28am    
thank you Sandeep
What does
this.offsetParent.scrollTop
returns?

please confirm that. I strongly believe that the issue is in this line
top:expression(this.offsetParent.scrollTop);


Regards
Sebastian
 
Share this answer
 
Comments
Janardan Pandey 15-May-12 2:42am    
this enable heading remain top at gridview

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900