I added the attribute opacity: .3;
to my img
tag but it only works for firefox. Is there a solution for firefox and ie8?
views:
330answers:
3
+3
A:
<img src="yourimage.jpg" alt="Text" class="opac" />
<style>
.opac
{
opacity:0.3; filter:alpha(opacity=30); height: 150px; width: 150px;
}
</style>
rahul
2009-09-15 12:22:48
thanks stackoverflow is rescuing my day
Markus
2009-09-15 12:25:08
+2
A:
IE uses the filter
property:
filter: alpha(opacity = 30); /* Supported by IE7 and 8 */
That should do the same as opacity: 0.3
peirix
2009-09-15 12:23:46
+2
A:
If you're using ie8 in standards mode you need to use:
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
Russell Leggett
2009-09-15 12:30:45