Solved

background image for option selects

Posted on 2008-06-11
2
749 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
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
bluefezteam earned 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

832 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