Opacity not working: IE8 vs IE7: seem to care about position style
I have found that in IE8 I cannot give an element the alpha filter (opacity) if it has the position style set to something (relative or absolute). An element without the position style (it is the empty string) can have opacity in IE8.
I have found that in IE7 I can only give an element the alpha filter if the position style is set to something (relative or absolute). An element without a position style will not take the alpha filter.
This is a major conundrum. Does anyone have any insight into this bug? Given the above, I can only achieve opacity in one of the two browsers.
I have both IE8 and IE7 running in standards mode.
The opacity is being set programmatically with JS like so:
where opacity is an integer between 0 and 100.
Obviously I don't have any problem with any other browser doing opacity because it is different styles for them and they don't care about the position style at all.
Turns out that IE is supposed to require the element to be positioned (for the alpha filter to be applied), so I don't know why IE8 won't do it for me on elements that are positioned. Thankfully there is a hack to make it work in IE7, which wants the element to be positioned: simply set the zoom style to 1.
|All times are GMT +1. The time now is 09:23 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.