Posted by cookie monster on April 18, 2005, 10:58 am
Please log in for more thread options
Hi,
I'm wondering if it is possible to display a image in a standard html
drop down like:
<select>
<option> <img src = "/images/img.jsp"> hello </option>
</select>
Does not seem to work. Any tips??
THX.
cookie.
Posted by Philip Ronan on April 18, 2005, 10:28 am
Please log in for more thread options
cookie monster wrote:
> Hi,
>
> I'm wondering if it is possible to display a image in a standard html
> drop down like:
>
> <select>
> <option> <img src = "/images/img.jsp"> hello </option>
> </select>
>
> Does not seem to work. Any tips??
No, you can't do that. The DTD doesn't allow it.
--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Posted by cookie monster on April 18, 2005, 12:11 pm
Please log in for more thread options
On Mon, 18 Apr 2005 09:58:27 +0200, cookie monster
>Hi,
>
>I'm wondering if it is possible to display a image in a standard html
>drop down like:
>
><select>
> <option> <img src = "/images/img.jsp"> hello </option>
></select>
>
>Does not seem to work. Any tips??
>
>THX.
>cookie.
I got it working like this using a style sheet:
<select style="width: 110px;">
<option style="
background-image: url(../images/flags/flag_A.gif);
background-repeat: no-repeat;
background-color: #ffffff;
color : #333333;
font-family : Arial, Verdana, Helvetica, Sans-Serife;
text-align:right;
left-padding:35px;">Austria</option>
<option style="
background-image: url(../images/flags/flag_GB.gif);
background-repeat: no-repeat;
background-color: #ffffff;
color : #333333;
font-family : Arial, Verdana, Helvetica, Sans-Serife;
text-align:right;
left-padding:35px;">England</option>
</select>
However, only seems to work in firefox not IE 6
cookie
Posted by Michael Winter on April 18, 2005, 10:36 am
Please log in for more thread options
On 18/04/2005 10:11, cookie monster wrote:
[snip]
> <select style="width: 110px;">
> <option style="
Use style sheets, rather than inline style attributes, especially when
declarations apply to more than one element.
[snip]
> font-family : Arial, Verdana, Helvetica, Sans-Serife;
The generic families are traditionally all lower case, but that
doesn't really matter. However what does is that there is only one 'e'
in 'serif'.
[snip]
> However, only seems to work in firefox not IE 6
IE should be using the OS to draw it's UI components, so it is far
less flexible. You won't get it working in existing IE versions.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Similar Threads Posted May 10, 2007, 4:24 am
Is there a way to set the width of in a ? March 8, 2007, 4:00 am
Option Select + input field in one October 3, 2007, 8:18 pm
how pass option values to JS routine? November 18, 2007, 10:16 am
need different view option for *.html file October 11, 2008, 7:42 pm
changing file name in "Save as" option for html files October 26, 2005, 3:43 am
Windows equivalent of BBEdit's "Gentle Hierarchical" formatting option? September 15, 2005, 3:14 pm
writing an html command to disable the right click>view source option November 1, 2004, 2:58 pm
sending hidden values AND option values at the same time ? September 12, 2006, 12:52 am