Tuesday, July 26, 2011

CSS Opacity not working in IE

Many of the times CSS Opacity of filter property is working fine in Firefox but not working in Internet Explorer.
After doing lot of search, test and trial i found that nested style of css opacity never works, opacity property of parent is automatically inherited in IE, thought it can work in Firefox/Mozilla. To solve this problem, I made the div for which css opacity property is to be applied as  parent most tag. I copied the code to top of the file.
After doing this stuff, now its working very fine in almost all browser.

So remember: css opacity property never work in nested tag, it overrides by parent opacity, child div automatically inherit parent's  opacity property. So to make it workable, take out this div/tag from its parent & make this div/tag as separate tag or parent of all tag. You can just move this tag to top of the page.

No comments:

Post a Comment