Solved

Drop Down Box Background Image

Posted on 2007-03-23
4
3,835 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Call a function within the ASP code 4 19
innerHTML 7 34
How do I select this logo using CSS? 6 29
asp Google Map 2 30
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
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 look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

856 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