Hello everybody,
Is it possible to insert a background image in a select box form?
Thanks in advance,
Pol
Hello everybody,
Is it possible to insert a background image in a select box form?
Thanks in advance,
Pol
Please be more careful with how you phrase a question. To me "select box form" would mean the form that contained a select box, which is probably not what you meant.Originally Posted by Pol NRG
The answer - in any case - is yes, however whether it works in a particular user agent is a different proposition altogether. With IE, it will not. There is no workaround.
Add the background as you would to any other element using the background CSS property.
Mike
Hi Mike,
Thanks for your answer and excuse me for my english![]()
All the best!
Pol
There is a way if you want to get into javascript, I wrote myself a custom javascript selectbox using floating divs which updated the value of a hidden input field. I rewrote most of the basic form elements this way so I could use custom images for them.
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.Originally Posted by Bytrix
I really don't think going to such lengths is worth the effort at all. It's a form control, for goodness sake.
Mike
Bookmarks