Keep input placeholder always visible
I am trying to style all the inputs in my website in a way that when they have a value or have focus the palceholder becomes the title of the input (it moves to the top of the input) but the default behavior of the browser hides the placeholder when there is data on it. I really want to stay away from JS solutions. Current results : My css : input:focus::-webkit-input-placeholder { transform: translate(-1rem,calc(-100% - 0.8rem)); font-size: 0.9rem !important; opacity: 1 !important; //this doesnt seem to keep the placeholder visible display:block !important; //this doesnt seem to keep the plac
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.