html - Input Box Text Color with CSS wheather on focus or not -


i have table runs script puts tablefilter @ top. table font white makes text in input box white , cannot see type. have done in css:

input, select, textarea{ color: black; }  textarea:focus, input:focus { color: black; } 

the issue above if lose focus on box changes white. type in , move on next box , turns white again. how can make work in css once enter text , if lose focus on text box stays black?

here: http://jsfiddle.net/fw26qevk/1/

#mytextbox {     border: 3px solid gray;     width: 368px;     height: 33px;     color: silver;     font-size: 22px;     padding-left: 10px;     padding:5px;      color:black  }  #mytextbox:focus{     outline:none;     border-color:blue;     box-shadow:0 0 10px blue;     color:blue; } 

you can css adding class on when in , out of focus.

$('input[type="text"]').focus(function() {     $(this).addclass("focus"); });  $('input[type="text"]').blur(function() {     $(this).removeclass("focus"); }); 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -