Formatting Placeholder Text

I have the following code.

<input class="domain" id="Domain" name="Domain" placeholder="Domain" required="required" type="text" value="" /> 

I am trying to format placeholder text because it looks very small in the text box, how would I do it?

+7
source share
3 answers

Try it in your CSS

 /*For Webkit browsers (Chrome, Safari) */ input::-webkit-input-placeholder { /* Your style here eg font size, color etc */ } /* For Mozilla Firefox */ input:-moz-placeholder { /* Your style here eg font size, color etc */ } 
+11
source

@Ilja's answer, including IE, will be as follows:

 /* For IE browser */ input:-ms-input-placeholder { /* Your style here eg font size, color etc */ } /*For Webkit browsers (Chrome, Safari) */ input::-webkit-input-placeholder { /* Your style here eg font size, color etc */ } /* For Mozilla Firefox */ input:-moz-placeholder { /* Your style here eg font size, color etc */ } 
+3
source

How to increase the font size of a class domain to some legible font size?

 .domain { font-size : 14px; } 
0
source

All Articles