Reputation: 31
I'm trying to mimic the placeholder attribute in my login/password form, using pure CSS.
Is there a way to do this? Can I absolutely positioning my label or values which say "user/password" to make them look like they are placeholder text in the field?
Not sure how to target the label/value.
<form>
<input type="text" id="username" label="username">
<input type="password" id="password" label="password">
</form>
Thanks all.
Upvotes: 3
Views: 1047
Reputation: 39872
I would use the new placeholder
css3 property and let old browsers be old browsers.
<input type="text" id="username" label="username" placeholder="username">
<input type="password" id="password" label="password" placeholder="password">
Upvotes: 2