W3C home > Mailing lists > Public > www-html@w3.org > August 2003

Re: Icon in Select Box

From: Matthias Gutfeldt <thatlist@yahoo.com>
Date: Tue, 5 Aug 2003 04:00:00 -0700 (PDT)
Message-ID: <20030805110000.13888.qmail@web41105.mail.yahoo.com>
To: www-html@w3.org

--- 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.


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Received on Tuesday, 5 August 2003 07:01:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:04 UTC