How do I set two values for IE's `filter` property?

Tags: css

Problem :

I have an issue that seems to have a workaround available. I need to set two values using IE's propriety filter property in CSS.

I have...

element {
   filter: alpha(opacity=40);
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)

The second filter seems to be overwriting the first, which is what I would expect.

How can I set them both?

Solution :

Maybe I'm not understanding the question correctly, but why do you want to use both?

This does both opacity and gradient.

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=Look,endColorstr=#00FFFFFF)

Looking at #00FFFFFF, The first 2 00 controls opacity and the last 6 digits controls color.

Check working example

    CSS Howto..

    How to split page into 4 equal parts?

    How do I make hidden description text push the content upwards when it shows

    How to add text or characters using CSS (no javascript)?

    Two sprites on same position: how to make this happen?

    How to bring all elements down with a header slide up/down?

    How do I make my css class footer go from the left to right side of the screen?

    How to target div within a modal box with CSS

    How to rotate background in CSS?

    css make img shown when hover a li

    How to select element by order ? - Css

    How can I increase input text elements' width via CSS?

    how to avoid extra blank page at end while printing?

    How do I adjust position of a text inside a Bootstrap panel with overriden max-height?

    How to add numbered list style in div tag

    how to select a input using jquery

    How to horizontally center a link element with CSS?

    How to add tooltip to image on hover with CSS

    How to apply CSS to first child div element only?

    how to insert css into html for blogger gadget

    how to override font-color dynamically with css color property

    How to draw error icon with css only,exactly like in the image

    CSS how to apply :first-child and :last-child

    How to style 3 (div) boxes using CSS

    How to override parent containers width property in CSS [duplicate]

    how to get this modal window to work correctly?

    How can I use CSS to center text in DIV

    How to build a submenu with CSS?

    Show and hide table column using jQuery

    How to display separate paragraphs in the same area using CSS HTML

    How to remove IconTabFilter icons using css?