Adding a <sup> asterisk to a placeholder or a good way to mark required fields with a placeholder
3 answers
:afterIt works, but you need to target the placeholder, rather than the input element ... and then you can use the properties position: absolute;and top, leftto move you *to wherever you want ...
( , webkit, firefox < 17, - , )
HTML
<input type="text" placeholder="E-Mail" />
CSS
::-webkit-input-placeholder:after {
content: '*';
}
:-moz-placeholder:after { /* Firefox 18- */
content: '*';
}
::-moz-placeholder:after { /* Firefox 19+ */
content: '*';
}
:-ms-input-placeholder:after {
content: '*';
}
+12