Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

text field input color css

text field input color css

Problem

I have a text filed in my form. The Color of the text in the text field should be in grey color. If i click it and type, the text should turn black and remains to be in black color.

I used the following css.

input[type=text]{ color:#999999;}
input[type=text]:focus{ color:#000;}

This is my html code

Now the text turns to black color when i am typing. But it turns back to grey color after typing. I need it to be in black after typing. How can i do that?

Problem courtesy of: designersvsoft

Solution

How about

Solution courtesy of: Musa

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

text field input color css

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×