2006-03-08

learned a new trick in css today:


input[type="text"],input[type="submit"],textarea,select {
color: #000;
background-color: #f5f5f5;
border:1px solid #bcbcbc;
}

Originally it was


input,textarea,select {
color: #000;
background-color: #f5f5f5;
border:1px solid #bcbcbc;
}

but i wanted to be able to specify ONLY for text fields and also (maybe) submit fields.. basically because i didnt want those stylings around my radio buttons and checkboxes. i figured id have to declare classes or something just for them, but NOPE! it's actually perfectly valid css 2. so i suggest you try it.

Note: unfortunately this seems to break IE.. so.. ill have to figure out a fix for that

Leave a Reply