Is it posible for input field to have one font-family and it's placeholder other?
I have tried to change font-family for input's placeholder with already defined @font-face in CSS but it's not working
CSS
.mainLoginInput::-webkit-input-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
.mainLoginInput:-moz-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
HTML
<input class="mainLoginInput" type="text" placeholder="Username" />
How can I slove this problem?
In case someone want the placeholders selectors for all browsers :
.mainLoginInput::-webkit-input-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
.mainLoginInput:-ms-input-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
.mainLoginInput:-moz-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}
.mainLoginInput::-moz-placeholder {
font-family: 'myFont', Arial, Helvetica, sans-serif;
}