Can I define style in CSS for input with attribute selectors and a class also?
input[type=text].focus
The above css does not work. But is there any way to achieve this?
try input[type="text"].focus (with quotes around attribute value)
example fiddle: http://jsfiddle.net/dn3wU/
Anyway also that specific unquoted value should work, as stated here
A valid unquoted attribute value in CSS is any string of text that is not the empty string, consists of escaped characters and/or characters matching /[-_\u00A0-\u10FFFF]/ entirely, and doesn’t start with a digit or two hyphens or a hyphen followed by a digit.