Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS for Select Option to be transparent background

Tags:

html

css

combobox

I have a web page that have background-image in it. After that, there's a combo box for filtering some content. I want to create this select - option background being transparent. I've read many result at google to use select option at CSS, but it didn't work. I've create a fiddle in here : http://jsfiddle.net/25CQE/5 For example and as You can see, the option background is not transparent. So, any idea how to solve that? Or it cannot be done by CSS?

Sorry for my bad English

like image 670
Cross Vander Avatar asked May 18 '14 07:05

Cross Vander


1 Answers

If you want to make it fully transparent, than use

select {
    border: 1px solid #fff;
    background-color: transparent;
}

Demo


If you are looking to have semi-transparent background color, than you can use rgba() where a stands for alpha

select {
    border: 1px solid #fff;
    background-color: rgba(255,255,255,.5);
    padding: 5px;
}

Demo 2

like image 190
Mr. Alien Avatar answered Sep 16 '22 17:09

Mr. Alien