Streaming live at 10am (PST)

Changing Text Color in Text Field


#1

I am using the following code to change the placeholder text in my search forms. And it works just fine:


input.input-box, textarea { background: white; color: black; }

.w-input::-webkit-input-placeholder { /* WebKit browsers */
color: red;
}
.w-input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: red;
opacity: 1;
}
.w-input::-moz-placeholder { /* Mozilla Firefox 19+ */
color: red;
opacity: 1;
}
.w-input:-ms-input-placeholder { /* Internet Explorer 10+ */
color: red;
}
input.black-text, textarea { color: black; }

I have two search boxes and I want to change the placeholder text in the second search box to a different color. I added the class .test to the input field however I can't figure out how to write the CSS to change only the 2nd search box's placeholder text color.

Any CSS gurus know the code I would need?


#2

Anyone CSS gurus that might be able to help me out?


#3

you can try this.

input.some-class[type="text"] {
color: yourcolor;
}

#4

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.