A quick and dirty CSS hack: PNG backgrounds

With the expanding support for PNG, it has become more and more frustrating to be prevented by IE's lack of support to fully use PNGs. We will try to find a way to bypass IE's limitations (until the next vesion comes out and hopefully solves the problem) by showing it what it can display, and by giving PNGs to more modern browsers.

Quick definitions

PNG
Portable Network Graphics. This format was designed as a means to replace GIF, originally because of a royalty question. But it expands GIF's transparency capacity by managing full 256-level alpha-transparency. See the W3C's recommendation.
GIF
Graphics Interchange Format
This format is not royalty-free, and has limitations. Yet it has been a de facto standard for transparent images on the web since the 89a implementation.
CSS
Cascading Stylesheets. But you knew that, didn't you?

For a more detailed description of the technical aspects of both, please refer to To PNG or not to PNG.

The situation at hand

So, Internet Explorer does not manage PNGs but you would very much like to have a nifty semi-transparent background to blend it better with your background. So far the solutions for IE have mainly involved Javascript, as a simple javascript alpha transformation method (see the example below), or more subtly, as a behavior method after the example of WebFX.

More Info

Know more about Tips?

  • websitetips.com
  • Stephane Deschamps
  • Web Designer ww.PawHtml.com