Tue, 2004-09-28 07:09
hi
i am not a newbie to css but have a question:
i want that in ALL my document ALL the input boxes will have a background color on "ONFOCUS" !
can i do it with css or do i have to put the "ONFOCUS" on every input tag ?
i tried :
input { onfocus: background-color: black }
and:
input:onfucos { background-color: black }
NONE WORKS
Tue, 2004-09-28 07:15
#1
how to do this ?
Hi,
i think onFocus is not a css pseudo element but javascript, so you need to write it in every tag...
greets
ben
Tue, 2004-09-28 07:19
#2
how to do this ?
those were my thoughts too,
anybody knows a css solution ?
Tue, 2004-09-28 10:02
#3
how to do this ?
Hi tzug,
You could use
input{background-color:red;} input:hover{background-color:green;} input:focus{background-color:blue;}Unfortunately it wont work in IE.
Hope that helps