Solved

Drop Down Box Background Image

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mobile version of website does not react 6 56
css question 1 33
SVG Star 4 18
Help cleaning out CSS 2 32
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

746 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

13 Experts available now in Live!

Get 1:1 Help Now