Reputation: 153
Here is my code. I don't understand why placeholder not shown in explorer. Please help.
HTML CODE
<form method="post" >
<input type="text" class="field" name="nom" placeholder="Votre Nom">
<input type="text" class="field" name="telephone" placeholder="Téléphone">
<center><input type="submit" id="submit_btn" value="Valider" class="btn_submit"></center>
</form>
Upvotes: 9
Views: 30508
Reputation: 3622
Make sure you have the right colours set up, and one on focus, and the focus one comes later (for higher specificity). For instance:
input::-webkit-input-placeholder {
color: transparent;
}
input:focus::-webkit-input-placeholder {
color: #888;
}
Upvotes: 8
Reputation: 4721
try OnFocus rather than using placeholder it will work
<input name="nom" type="text" value="Votre Nom" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
Let me know whether it works or not
Upvotes: 19