PNG Alpha Transparency Support in IE 5.5+

A coworker was asking me about PNGs the other day, and I pointed him to the LibPNG page — one of the more comprehensive sites I’ve found on the PNG format. For those not aware, PNG is a lossless image format (like GIF) but it supports up to 24 bit color (like JPEG). It’s also supported by all the major browsers and many desktop applications.

Another advantage to PNG is that it supports alpha transparency. Unlike GIFs which have on-or-off transparency, PNGs support up to 256 levels of transparency. So, a properly designed PNG image with alpha transparency can look good against a background of any color.

Basic PNG functionality is supported by almost all browsers (Netscape, IE and so on), and support for PNG’s alpha transparency is also widespread. In fact, just about every browser — even the Sega Dreamcast browser — supports alpha transparency… except for IE on Windows (PNGs work there, just not the alpha transparency part).

And, as IE/Windows currently has the largest market share, it was thought that PNGs with alpha transparency essentially weren’t usable on the web. However, after re-reading the IE/Windows section, I see that there’s now a workaround to get PNG alpha transparency support in IE 5.5+!

As I understand it, IE can be induced — via some proprietary HTML — into using DirectX to render PNGs. And, as DirectX supports alpha transparency, you get alpha-channel support in IE. As all the other major browsers already have alpha channel support, it’s conceivable that PNGs with alpha channel transparency could be used throughout a site.

Multiple IE Versions on One Box!!

Joe Maddalone of Insert Title Web Designs has discovered a method of running multiple versions of IE on one box! He made the discovery when he noticed that a developer’ edition of IE was able to run concurrently with his installed version.

Working backwards, he discovered which files the developer’s edition used and applied that knowledge towards older IE versions — he downloaded their respective CAB files and extracted bits as needed. A few tweaks later, and he had stand-alone versions (screenshot). (The tweaks, involving IEXPLORE.exe.local, are further explained in the article.)

Of course, Joe outlines the steps he used to create the stand-alone versions and you could follow along with those. Or — even easier — QuicksMode.org has links to the ready-to-run stand-alone versions of IE download.

I’ve tested this on my XP machine here at work, and it works great! When running multiple versions of IE, it can be easy to confuse which version is which; so, QuicksMode wrote a small script to dynamically prepend the IE version number to the page’s title (so that it’s easily visible in the taskbar).

Joe also includes a link for PayPal donations at the bottom of his page to cover bandwidth costs and the like. And, considering how much time this discovery will save me, I was happy to contribute.

PS As you may have noticed, I’m not one to use exclamation points gratuitously. It could have been two years or more since I last typed two consecutive exclamation points. But, I was so excited about this discovery that I included two in the title of this blog entry ;).

New CSS Support in IE6

One of my recent projects has the luxury of only requiring support for IE6 (and Mozilla, natch). This is a rare occurrence, since most clients require support for least a version or two back (and justifiably so). However, in this case, a web application in another portion of the website (contracted to another vendor) already required IE6, so that support cascaded to the rest of the site.

Coding for such recent browsers is a bit surreal, in a way — all of a sudden, I can write standards compliant code and there’s a good chance it could work work without fiddling ;). Along those lines, I decided to check on new CSS support that may have been introduced into IE6. Generally, I wouldn’t give much thought to the workings of such a recent browser, but such knowledge could be useful to me this time.

So, after briefly searching Google, I found this MSDN Library article on CSS Enhancements in IE6. I was already aware of several of the features, such as IE6’s support for the CSS box model (in short, the CSS spec states that padding is added to an element’s width, and IE versions before 6 ignored this).

I was also pleased to see that IE6 includes some useful bits such as support for min-height (you can specify the minimum height on an element). Interestingly enough, the article didn’t mention min-width, which I would think they could have implemented at the same time (or, should have been). Perhaps most amusing to me, though, is that IE6 only now supports padding on images. How is it that image-padding slipped under their radar for so long?

SSL Defeated in IE and Konqueror

From The Register, anyone with a valid VeriSign SSL site certificate can forge any other VeriSign SSL site certificate in IE and Konqueror:

A chain is formed when an intermediate certificate is trusted between server and client. Supposedly, the intermediate is accepted only if it’s signed by the certificate authority as safe for the purpose. If it’s merely signed by another certificate’s key, it ought not to be trusted, or at least the user should be warned. Unfortunately, due to a preposterous security engineering oversight, IE and Konqueror don't bother to check this [&hellip]

Mozilla isn’t affected, as usual, though the author chides Mozilla as if maybe it’s a Mozilla quirk that is preventing the exploit. I would hope that The Register’s authors wouldn’t have such uninformed preconceptions :-/.