pcharb
pcharb

Reputation: 184

Transparent div in IE

How can I display a div with an alpha background in IE > 7.

I've got this css code for all browser

background-color: rgba(102, 102, 102, 0.30);

but it doesn't work in IE 7,8. Don't test it in ie 9 or 10 actually.

Do someone know how to make it work, It's for put a transparent div over an image

Upvotes: 0

Views: 720

Answers (2)

Gatekeeper
Gatekeeper

Reputation: 1616

You can create another div only for background(same size as your div, position abolute etc) and then set it color + cross-browser transparency like .transparent { filter:alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3; }

Upvotes: 2

Hans Wassink
Hans Wassink

Reputation: 2577

I found the best cross browser option for opacity is to use a 30% transparent png as background of the top div

Upvotes: 4

Related Questions