Drop-down image list with CSS

Using CSS, it should be possible to style your <option> elements. That means you can set width, height, and background-image to anything you want. Alas, IE fails to support this, so it just shows the text. If you view this in Mozilla, you get a nice drop-down image list. An onchange handler for the <select> element sets the class of the <div id="selImg"> to that of the selected <option> (and thus the selected image).


UPDATE 20020817: Joe Howley let me know it doesn't work in Opera 6/Win (and therefore probably no Opera at all).

UPDATE 20020819: this is the effect I'm after (as viewed in Mozilla 1.0):
Screenshot of drop-down list in Mozilla 1.0

UPDATE 20020819: Ondrej Ivanic has a very nice application of a drop-down image list.