1

I am looking for an opposite of select:focus, something that would style the select from CSS after a selection is made.

concept:

select:when not focused
{
    color:transparent;
}
rtruszk
  • 3,902
  • 13
  • 36
  • 53
Jagtar
  • 176
  • 2
  • 5
  • 11
  • 2
    Check ["Does CSS have a :blur selector ( pseudo-class )?"](http://stackoverflow.com/questions/11703241/does-css-have-a-blur-selector-pseudo-class) – PoseLab May 16 '13 at 12:43

3 Answers3

4

You could use :not pseudo-class and combine it with the :focus one. Something like this should work:

select:not(:focus) {
  color: red;
}

Here's a demo: http://jsfiddle.net/b2rnU/1

Pavlo
  • 43,301
  • 14
  • 77
  • 113
pzin
  • 4,200
  • 2
  • 28
  • 49
1

do u mean on focusout

$("element").focusout(function() { ... });
Ashok Damani
  • 3,896
  • 4
  • 30
  • 48
1

Editing to what @Pzin said, add a new class with select to get what you want.

Like

select:focus {
  background: white;
}
Nitesh
  • 15,425
  • 4
  • 48
  • 60