-1

I have this:

CHtml::textField("Atava[admin_panel][0][u_type]", '', array('size'=>60,'maxlength'=>128,'encode'=>false,'placeholder'=>'Placeholder content') );

My problem is:

when I add text to the text field, the placeholder text disappears (as it should)

But the added text gets the same color as the Placeholder text color(light grey).

I want the added text to have the default color (like it has without a placeholder)

any ideas??

Asaf Maoz
  • 675
  • 3
  • 6
  • 23
  • Just to be clear: I don't mind the color of the Placeholder text- light grey is good, My problem is that after I add text to the text field - the added text has the same color as the place holder text(light grey), I want it to have its regular color. – Asaf Maoz Apr 28 '14 at 14:48

1 Answers1

1

Set css styles for placeholder http://jsfiddle.net/SKS23/

*::-webkit-input-placeholder {
    color: red;
}
*:-moz-placeholder {
    /* FF 4-18 */
    color: red;
}
*::-moz-placeholder {
    /* FF 19+ */
    color: red;
}
*:-ms-input-placeholder {
    /* IE 10+ */
    color: red;
}
Alex
  • 8,055
  • 7
  • 39
  • 61
  • Just to be clear: I don't mind the color of the Placeholder text- light grey is good, My problem is that after I add text to the text field - the added text has the same color as the place holder text(light grey), I want it to have its regular color – Asaf Maoz Apr 29 '14 at 09:36
  • @AsafMaoz Then check css styles for input field – Alex Apr 29 '14 at 09:42