Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reset or override IE CSS filters?

I'm using the proprietry MS 'filter' property to try and create a non ugly equivalent to css3 text-shadow and box-shadow;

I was actually doing really well until I hit this problem. It looks like when I apply a filter to a div inside another div which also has a filter the filter effects end up being combined on the child object.

I've tried using filter:none; to do a reset but no joy. I've also tried different variations on the syntax, ie "-ms-filter: 'progid:...Glow()'", "filter: progid:...Glow()", "filter: Glow()", etc..

Testing in IE8

like image 702
SpliFF Avatar asked Nov 20 '09 03:11

SpliFF


People also ask

Can you have multiple filters CSS?

CSS Filter Property Multiple Filter ValuesTo use multiple filters, separate each value with a space.

How do CSS filters work?

CSS Filters are a powerful tool that authors can use to achieve varying visual effects (sort of like Photoshop filters for the browser). The CSS filter property provides access to effects like blur or color shifting on an element's rendering before the element is displayed.


2 Answers

There is boolean attribute enabled, for which you can set false or true http://msdn.microsoft.com/en-us/library/ms532997%28v=vs.85%29.aspx

Example:

-ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)"; 
like image 53
el22or Avatar answered Sep 30 '22 17:09

el22or


The -ms-filter property is a non-standard, browser-specific CSS entry and as such requires that its parameter is enclosed with quotation marks. So -ms-filter: "none" will work just fine.

like image 35
Pink Duck Avatar answered Sep 30 '22 19:09

Pink Duck