Solved

Drop Down Box Background Image

Posted on 2007-03-23
4
3,817 Views
Last Modified: 2013-11-19
I am trying to add a background image to a drop down box but have been unsucessful.  The code for the field is:

<select name="vehiclemake" id="vehiclemake" style="border:1px solid #808080; background-position: left top; font-family: Verdana; color: #FFFFFF; font-size: 10pt; font-weight: bold; background-color: #666666; background-image:url('http://theinternetcarlot.com/staff/customers/images/tdheaderbg.jpg')" value=''/>

Any ideas of why it isn't working?  Thanks!
0
Comment
Question by:jeveloff
4 Comments
 
LVL 29

Expert Comment

by:Badotz
ID: 18782174
um, it isn't supported?
0
 
LVL 9

Expert Comment

by:pmagony
ID: 18786915
I don't know if this is possible or not.

Your code syntax is wrong:

<select name="vehiclemake" id="vehiclemake" style="border:1px solid #808080; background-position: left top; font-family: Verdana; color: #FFFFFF; font-size: 10pt; font-weight: bold; background-color: #666666; background-image:url('http://theinternetcarlot.com/staff/customers/images/tdheaderbg.jpg');" value=''"/>

You forgot to end your background image syntax with a semi-colon, and then you had an html attribute of value, that wasn't closed correctly with the last quote.  Give it a whirl, hope it works for your sake, but I doubt it.
0
 
LVL 30

Accepted Solution

by:
VirusMinus earned 500 total points
ID: 18789772
its very flaky support, if at all. your best bet is to build a custom javascript select.

see examples of what is possible here:
http://lab.artlung.com/form-image-background/
http://binnyva.blogspot.com/2006/01/icons-for-select-menu-options-in.html

some info on how it doesnt apply to form elements in various browsers:
http://www.blooberry.com/indexdot/css/properties/colorbg/bgimage.htm
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remaiā€¦
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now