• # August 15, 2012 at 2:30 pm

    I have a login form with placeholder text defined with a gray color. I would like when a user enters there name into the username input and then clicks the password input field to have the font color on the username switch back the the gray of the placeholder text. Is there a way to do this with only CSS or do I have to use Javascript?

    # August 15, 2012 at 2:46 pm

    You just need to set a color when the input field has focus.

    # August 15, 2012 at 3:19 pm

    Thats what I have in place now. I would like the user entered text to remain the black as focus is changed to the next input to show that the user has filled that input.

    # August 16, 2012 at 4:56 am

    Aha…found what I was looking for:

    Search google and CSS-Tricks has the answer all along:

    # August 17, 2012 at 4:15 am

    @death180 That’s not what he wants.

    He wants the placeholder to be ‘grey’
    A color for text being input (as it’s input)…can be any color
    A (possibly) third color (black) to show the entered text once the user moves on to the next box.

    Like this:

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.