- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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?
You just need to set a color when the input field has focus.
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.
Aha…found what I was looking for:
Search google and CSS-Tricks has the answer all along: https://css-tricks.com/snippets/css/style-placeholder-text/
@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: http://codepen.io/Paulie-D/pen/asEiq