Ultragames
12-07-2006, 07:55 PM
The objective is to get the contents of a DIV to a certain opacticy. Before adding the complexity of javascript and nested divs and links, i started out with basic tests and I ran into this problem: If I apply a filter opacity to a specific object inside of a div, it works. If I apply the opacity to the div itself, the contents should be opaque, however this only appears to work in Firefox. I need this to work in IE6 and IE7. I seem to remember being able to do this a year or so ago, but now I cannot figure out how to get the contents of a div to be opaque in IE6 or IE7.
The following work in FF2, but not IE7
<div style="filter: alpha (opacity=35); opacity: 0.35;">
<img src="http://www.google.com/images/logo_google_suggest.gif" border="0" />
</div>
The following works in both IE7 and FF2
<div>
<img src="http://www.google.com/images/logo_google_suggest.gif" border="0" style="filter: alpha (opacity=35); opacity: 0.35;" />
</div>
For those of you who might suggest that I simply not use opacity, this is unfortunatly not an option. This is a request that the client has made, and I must find a way to do it if it is at all possible.
My question to you: How can I make the contents of a div be opaque in a cascading manner?
Thank you.
The following work in FF2, but not IE7
<div style="filter: alpha (opacity=35); opacity: 0.35;">
<img src="http://www.google.com/images/logo_google_suggest.gif" border="0" />
</div>
The following works in both IE7 and FF2
<div>
<img src="http://www.google.com/images/logo_google_suggest.gif" border="0" style="filter: alpha (opacity=35); opacity: 0.35;" />
</div>
For those of you who might suggest that I simply not use opacity, this is unfortunatly not an option. This is a request that the client has made, and I must find a way to do it if it is at all possible.
My question to you: How can I make the contents of a div be opaque in a cascading manner?
Thank you.