Re: Icon in Select Box

--- Johannes Koch <koch@w3development.de> wrote:
> 
> Sameer Singla wrote:
> > Is it possible to add a icon in an select box. I mean adding an
> icon in each option for a slect box in HTML
> 
> Did you take a look at the HTML specification? It says:
> 
> <!ELEMENT OPTION - O (#PCDATA)         -- selectable choice -->
> 
> So the only element content for the option element can be text.

Agreed, not legal with HTML. On the other hand, one could use CSS to
add an individual background-image to each option element. I tried a
minimal example and it works in my version of Mozilla, but not in
Opera7 or Internet Explorer 6.

Not that I recommend decorating form elements.


Matthias


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Received on Tuesday, 5 August 2003 07:01:43 UTC