Lien
Lien

Reputation: 515

Opacity Properity in IE6

I have been working on this for a little while, and I have also searched stackoverflow, but couldn't find an answer.

Here's what I'm trying to do:

#container {
    margin: 0 auto;
    width: 950px;
    opacity: .5;
    filter: alpha(opacity = 50);
    background: #fff;
    filter: alpha(opacity=50);
    -moz-opacity: 0.5;
    -khtml-opacity: 0.5;
    opacity: 0.5;
}

But it doesn't work for me in using IETester.
The other versions display it correctly, IE6 does not.

So, where is the bug?
What have I missed ?

Upvotes: 1

Views: 322

Answers (1)

wsanville
wsanville

Reputation: 37516

For IE 6 and 7, try the following:

filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);

Source.

Upvotes: 3

Related Questions