[Webinar] Learn how to a build a cloud-first strategyRegister Now


Applying background-image to <SELECT> element

Posted on 2006-06-01
Medium Priority
Last Modified: 2011-08-18
Hi experts

Looking for a quick answer...

Anyone know how to make this work?

my code:

<select name="cboTest" id="cboTest">  
<option value="1" style="background-image: url(./_img/plus.gif);" selected>    one  </option>
<option value="2" style="background-image: url(./_img/minus.gif);">    two  </option>  

Alan ";0)

ps... Code works fine in firefox, but not in IE 7
Question by:Alan Warren
LVL 18

Expert Comment

ID: 16806019
Have you tried messing with:

background-repeat: no-repeat;
background-position: 1px 2px;


The shorthand css is:

background: url(.jpg) no-repeat 1px 2px;
LVL 10

Accepted Solution

ClickCentric earned 2000 total points
ID: 16811620
LVL 30

Expert Comment

ID: 16811813
from: http://www.dynamicdrive.com/forums/archive/index.php/t-1646.html
> I really don't think going to such lengths is worth the effort at all. It's a form control, for goodness sake.
I most definitely agree!

You can use radio buttons instead... but i guess you know that already.
LVL 26

Author Comment

by:Alan Warren
ID: 17055624
Sorry for the delay.

Finding out that there is no work around for IE, was the information I was looking for.


Alan ";0)

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

864 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