PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Dec 21, 2014 8:29 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Aug 08, 2012 6:23 am 
Offline
Forum Contributor

Joined: Sat Mar 31, 2012 6:50 am
Posts: 112
hi,how can i set a transparent background for selectbox?
thanks


Top
 Profile  
 
PostPosted: Wed Aug 08, 2012 1:00 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 12722
Location: New York, NY, US
If you mean inside the select box, then you will need to implement it yourself. The select is rendered differently by different browsers.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Thu Aug 09, 2012 3:38 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2775
Location: .za
You can use the css below but there is a catch
Syntax: [ Download ] [ Hide ]
        select {
                background-color: rgba(255, 0, 0, 0.5);
        }
 

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.

_________________
“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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group