0

I set a transparent background in a div element. It's child element don't have a transparent background.

I have:

background: rgba(181, 182, 183, 0.6);

For IE, i tried below:

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#B5B6B700, endColorstr=#B5B6B700);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#B5B6B700, endColorstr=#B5B6B700)";

What would be the correct hex value? Im not sure on the last two digits.

nathan hayfield
  • 2,627
  • 1
  • 17
  • 28
JR Galia
  • 17,229
  • 19
  • 92
  • 144

1 Answers1

0

Try @MatTheCat's answer here for an IE transparent background fallback: CSS background opacity with rgba not working in IE 8

Looking at your current code, if you are having trouble getting the background to be transparent, you may need to add zoom: 1 in order to trigger hasLayout in IE.

Try this:

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#B5B6B700,endColorstr=#B5B6B7000); 
zoom: 1;

More info on hasLayout.

Community
  • 1
  • 1
zxqx
  • 5,115
  • 2
  • 20
  • 28