OK Internet Explorer (mainly <7 ) is the source of headache for most of us. The box model, the transparency problem and it’s poor CSS support have made designers hack their code to have their designs look the same (not always though) on IE as they would on all other browsers. But, there are some awesome, IE specific, features that should be present on other browsers too. In this article, we will list some IE features that Firefox, Opera and other browsers should have.
The CSS Filter Property
Internet Explorer supports a filter:command style CSS property that can add some style to HTML elements on your pages. For example you can create a fade effect on any block element on your pages with:
ELEMENT {filter: Chroma(Color=#C1DEFF) Alpha(Opacity=200, FinishOpacity=0, Style=2, StartX=gradient start X position, StartY=gradient starting Y position, FinishX=gradient finishing X position, FinishY=gradient finishing Y position)
}
where “ELEMENT” is any block element. You can use the above code to transform this image:
to something like this:
You can also create gradient div elements with the same trick. Another great method of the filter property is “filter:gray” which, when used on images, the images will be gray-scaled. So by doing this:
img{
filter:gray;
}
will display the image like this:
while by using the “filter:fliph” or “filter:flipv” methods, the images will be flipped horizontally and vertically accordingly. The next cool filter method is “filter:invert” which when used on images, would display the image like this:
Another image transformation can be achieved with “filter:wave“. You might have guessed what this method does but if you didn’t, put this code in your page:
img{
filter:wave(Strength=5,lightstrength=15)
}
and you should get an image with a wave effect like this:
A method similar to the “filter:invert” method is “filter:xray” which produces the following effect:
wait.. There’s some more.
You can pixelate any image with this code:
img{
filter:progid:DXImageTransform.Microsoft.Pixelate(maxsquare=6)
}
eg:
add some blur with “filter:blur(strength=VALUE)“:
img{
blur(Strength="50")
}
or add some glowing effects to some text and keep the text selectable as shown here:
with this code:
p{
filter: glow(Color="#000eee",Strength="6");
width:200px;
font-size:30px;
}
and adding shadows to text can be done with this code:
p{
filter: dropShadow(color="#ddd0d0",offX="2",offY="2");
width:200px;
font-size:40px;
}
The result is not 100% what we expected though since the transformation sharpens our text:
The MSDN site has a lot of info about the filter property and some other IE specific CSS properties in case you are interested in it.
We do not advise you to use any of these CSS properties on your pages here. We are just trying to show that some of these properties could be added to other browsers too, since most of them have to do with presentation and style. For example why use a heavy JS library to add some effects like fade or gray-scale when you can do it with 1 line of text?
For flame lovers:
We use Opera (70%) and FireFox (30%). So, no IE lovers here…
Popularity: 1%
Related posts:
- CSS Snippets That Can Come Handy Sometimes doing something with CSS that looks the same for...
- Awesome (Chrome) Javascript Experiments I was surfing the web when i got back to...
About the Author:
Filed under: Design, Tutorials - Trackback Uri
















It’s like the scrolbar css properties or the rounded corners… Do you expect Firefox to implement a filter named progid:DXImageTransform.Microsoft.Pixelate? :) If filter were a standard W3C property it’s likely that Firefox and Safari would support it.
Title is wrong, css filtering is ONE feature, not featureS.
So basically, because you can’t use photoshop/gimp *before* you upload the pictures to your website, you’re using a proprietary feature only IE supports this way to make the browser an extension of your graphics pipeline. Yeah, *that’s* brilliant.
“Great” “Feature”…
@Giorgio Sironi
I don’t expect Firefox and other browsers to implement a progid:DXImageTransform.Microsoft.* but a way to do the same. For example the innerHTML property of JScript that became a part of JavaScript because it was a brilliant feature.
@Florian
Q : What does border:1px solid silver; do to an image?
A : It adds a silver border to an image.
Q : And can’t i use Photoshop for this???
Why should i go through Photoshop to add such a simple thing to an image, when i can do it with 1 line of code?
I totally dig proprietary unstandardized ways to do things on the web, especially with graphics. Way to go dude, maybe you should try Adobe AIR or Silverlight or whatever floats your boat of pink pony pipe dreams of making web content for the narrowest possible definition of audience.
A lot of people know my connection to open source, my dislike of IE and generaly my love for open technologies… Don’t need to go on a flame with you or anyone. My opinion, your opinion, friends after all :)