Is there a way to put a background image in a drop down menu thru CSS?
| SitePoint Sponsor |
Is there a way to put a background image in a drop down menu thru CSS?




We'll have to take a look at the script.
If it's a drop-down menu, it shouldn't be a script duckie. I think that derek means the <form> type drop-down menu. If that's what you mean derek, here's how:Originally posted by duckie
We'll have to take a look at the script.
An example of a local extension would be "images/plane.gif".Code:select { background-image: url(the local extension goes in here); }
Tell me if it works!![]()
SPF Mentor/Advisor 2001-2003
SPF Designer of the Year 2002
SPF Graphic Designer of the Year 2003
AdamPolselli.com




Ahh, when I see "drop down menu" I keep thinking "DHTML menu", for some reason.





It will not work. You simply cannot do that with drop down menus or anything with the form tag ... yet.
Although it is a good idea derek, Adam.![]()
Colin Anderson
Ambition is a poor excuse for those without
sense enough to be lazy.



You could always settle for a background-color:colour, lol.




Well actually in Mozilla setting a background image works for <option>, but not <select>.
The image will tile though, so the effect won't be really good, but yeah, just to inform you guys its possible.





That's what I was referring to -- the <select></select>.
I did not know, however, that it would work when defined in <option></option> in NS6.x/Mozilla. Very interesting.
Colin Anderson
Ambition is a poor excuse for those without
sense enough to be lazy.
That's strange.....
I got my answer from TopStyle Lite. I opened it, chose <select> as my selector, and when it gave me all of the attributes, background-image was one of them. Sorry about the misinformation![]()
SPF Mentor/Advisor 2001-2003
SPF Designer of the Year 2002
SPF Graphic Designer of the Year 2003
AdamPolselli.com
Bookmarks