Input does not load disabled style

Asked

Viewed 47 times

2

I’m editing a few input, select and textarea, removing the "standard" style, but I’m having a problem. When he’s like disabled, should appear with a dark background. But it appears in white color, same locked state. Someone knows what I can change?

CSS:

input, select {
    border: 1px solid #848484; 
    -webkit-border-radius: 30px; 
    -moz-border-radius: 30px; 
    border-radius: 30px; 
    outline:0; 
    height:100px; 
    width: 350px; 
    padding-left:10px; 
    padding-right:10px; 
}

How the bottom should look:
inserir a descrição da imagem aqui

How are you getting even disabled:
inserir a descrição da imagem aqui

1 answer

3


You can use it like this:

input {
    border: 1px solid #848484; 
    -webkit-border-radius: 5px; 
    -moz-border-radius: 5px; 
    border-radius: 5px; 
    outline:0; 
    height:100px; 
    width: 350px; 
    padding-left:10px; 
    padding-right:10px; 
}

input[disabled]{
	background-color: #844;
}
<input type="text">
<input type="text" disabled>

Thus you select input that have an attribute disabled.

jsFiddle: https://jsfiddle.net/z95ybuph/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.