0

I added the attribute opacity: .3; to my img tag but it only works for firefox. Is there a solution for firefox and ie8?

Dominic Rodger
  • 97,747
  • 36
  • 197
  • 212
Markus
  • 1,465
  • 4
  • 18
  • 29

3 Answers3

3
<img src="yourimage.jpg" alt="Text" class="opac" />

<style>
.opac
{
    opacity:0.3; filter:alpha(opacity=30); height: 150px; width: 150px;
}
</style>
rahul
  • 184,426
  • 49
  • 232
  • 263
3

If you're using ie8 in standards mode you need to use:

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
Russell Leggett
  • 8,795
  • 3
  • 31
  • 45
2

IE uses the filter property:

filter: alpha(opacity = 30); /* Supported by IE7 and 8 */

That should do the same as opacity: 0.3

peirix
  • 36,512
  • 23
  • 96
  • 126