hi,how can i set a transparent background for selectbox?
thanks
hi,how can i set a transparent background for selectbox?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: hi,how can i set a transparent background for selectbox?
If you mean inside the select box, then you will need to implement it yourself. The select is rendered differently by different browsers.
(#10850)
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: hi,how can i set a transparent background for selectbox?
You can use the css below but there is a catch
As Christopher mentioned different browsers render elements differently so the declaration above will work for IE9 and FF but Chrome will only make the dropdown section's background transparent. Also remember that the above will probably not work prior to IE9 so you may need to use an image for that purpose in an IE-only stylesheet.
Code: Select all
select {
background-color: rgba(255, 0, 0, 0.5);
}
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering