As far as I know, this is not possible.
One solution that I saw earlier is to add a red star background image to the input box, but this makes it difficult to duplicate the visual alignment that you are going to use. Additional information about this method: Use CSS to automatically add a required field asterisk to form inputs
Another solution would be to add a range (and placeholder text) outside the input field, but this will require some JavaScript to control when it is and is not displayed.
Here is the JSFiddle I just created for this method (using jQuery): http://jsfiddle.net/nLZr9/
HTML
<form> <div class="field"> <label class="placeholder" for="email"> Email Address <span class="red">*</span> </label> <input id="email" type="text" /> </div> </form>
CSS
.field { position: relative; height: 30px; width: 200px; } input, label { position: absolute; top: 0; left: 0; bottom: 0; top: 0; background: transparent; border: 0; padding: 0; margin: 0; text-indent: 5px; line-height: 30px; }
Js
$('.field input') .on( 'focus', function () { $(this).siblings('label').hide(); } ) .on( 'blur', function () { if ( !$(this).val() ) $(this).siblings('label').show(); } );
Robert Messerle
source share