Solved

Drop Down Box Background Image

Posted on 2007-03-23
4
3,879 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Suggested Courses

636 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