Cross-Browser Transparent Images

egg
egg
egg

This egg graphic is a transparent PNG which lets the background color of the div it's in show through. What's unusual about this page is that it works in Internet Explorer thanks to a proprietary CSS hack described in A List Apart.

Users of standards-compliant browsers will see the egg displayed normally. The stylesheet hides the egg image for IE users and displays it via something called the AlphaImageLoader filter. So the page looks the same no matter which browser you're using. A great solution as long as you don't mind your stylesheet not validating. View source to see what's going on.

<< Back to tech index