html5 placeholder

Hello all…

I want to give different color and style to input placeholder other than default.

but I’m yet to find a way.

Please help me.

If you mean an actual <input> then no you can’t :). That element (along with other form elements) are nearly impossible to style due to them being styled by the system.

You have to live with it :slight_smile:

ohh it means better to do with js.

Thanks for the reply or else I would have still continued to search for the solution.

You can style input fields with CSS.

For example:

form button, form input[type="submit"], form input[type="reset"], form input[type="text"], form input[type="password"], form textarea, form select { border: 1px solid #c5d0f2; }

You can technically do a few things with them, although the amount of changes the OP wanted would make it impossibe to do :wink:

Javascript would be best if you absolutely feel like you need it :slight_smile:

See http://lists.w3.org/Archives/Public/www-style/2010Mar/0095.html