?
Solved

background image for option selects

Posted on 2008-06-11
2
Medium Priority
?
753 Views
Last Modified: 2012-05-05
Hello,

I need a background image for my option selects.

My code works in FireFox but not IE
<style>
option {
background: red url(http://www.gosmelltheflowers.com/blog/wp-content/uploads/2007/10/flowers.jpg) no-repeat scroll top left;
}
</style>
 
<select name="showpin[0]" id="showpin_0"  onchange="changePin(this);">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>

Open in new window

0
Comment
Question by:hankknight
[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
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
bluefezteam earned 2000 total points
ID: 21761645
With IE it will not show background images as part of a select form control. There is no workaround.

There is a way if you want to get into javascript, You could write a custom javascript selectbox using floating divs which updated the value of a hidden input field. However, your users could be rather screwed if they don't have scripting enabled (or the necessary scripting support) and you didn't include a decent fallback.

I really don't think going to such lengths is worth the effort at all.
0
 
LVL 10

Expert Comment

by:bluefezteam
ID: 21761702
http://www.templatemonster.com/

This site uses a custom select box to achieve a customised background, you may be able to see how they've achieved it, just click their drop downs
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
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…
Suggested Courses

800 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