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..

    Fullpage.js: How to add css class “active” to slide anchor

    How to put bootstrap code inline

    How to change pseudo class property?

    How do I insert a custom font to text with CSS? [duplicate]

    How to reset default styling of input[type=“text”]:focus in Chrome and Safari?

    How to hide show image link on top of another image link

    How to use HTMLElement.classList(.toggle)?

    How to extend the border-top on my nav_bar class

    How to change just the css inside a DIV and not anywhere else?

    css: How to float div according to 2nd div in hierarchy

    How can I make vertical switch

    How to change color of footer? (Materialize)

    how can assign left of div to left of screen when margin set to auto?

    How do I divide all margins but last to even out space?

    CSS Firefox - How to deactivate the dotted border ( firefox click indicator )?

    How can i repeat the image rollover and have multiple aligned underneath on my website?

    How can I get a jquery css container to pop up letting the user know data was successfully entered?

    How to correctly switch images with javascript?

    How to center a navigation bar properly? [closed]

    how to make dropdown using html and css?

    css code how to put the navigation in the middle

    How to prevent document scrolling but allow scrolling inside div elements on websites for iOS and Android?

    How can I separate a column on a web page depending on whether or not the browser is mobile?

    How to get rid of spaces with CSS

    How can I apply some css for all readonly elements on focus in IE8?

    How do I apply properties to a previous sibling on hover?

    How can I increase the size of twitter bootstrap carousel navigation arrows

    How to make div layer unselectable in jquery and css

    how to change glyph height without changing the font-size?

    How to hide this element using CSS or JQuery