Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Following Errors are shown while building Solution, Can anybody tell whats wroung here..

C#
.modalBackground
{
      background-color:ButtonShadow;
      filter:alpha(opacity=70);
      opacity:0.7;
}


MSIL
Error   1   Validation (CSS 2.1): 'filter' is not a known CSS property name.    D:\WebSite1\css\Styles.css    287 4   D:\e-prescription\



C#
.HeaderFreez
{
   /*position:relative ;*/
   position:relative;
   /*top:expression(this.offsetParent.scrollTop);*/
  /* top: expression(this.parentNode.parentNode.parentNode.scrollTop-1);*/
  top: expression(this.parentNode.parentNode.scrollTop-1);
   /*z-index: 10;*/
   z-index:15;
}


MSIL
Error   3   Validation (CSS 2.1): 'expression(this.parentNode.parentNode.scrollTop-1)' is not a valid value for the 'top' property. D:\WebSite1\css\Styles.css    349 8   D:\e-prescription\
Posted

1 solution

It actually pretty simple neither filter or expression is valid under CSS as such when you try to build you solution it fails validation under the CSS 2.1 standard.

Specifically filter is IE specific not a part of the CSS standard.

Firefox uses the property opacity:x for transparency, while IE uses filter:alpha(opacity=x).

Tip: The CSS3 syntax for transparency is opacity:x.


The expression value is another IE specific addition that is not valid CSS.
 
Share this answer
 

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