user1043000
user1043000

Reputation:

Placeholder Text Formatting

I have the following code.

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

Im trying to format the placeholder text because it appears very small in the textbox, how would I go about doing this?

Upvotes: 8

Views: 10860

Answers (3)

Nizam
Nizam

Reputation: 4699

The @Ilja answer including IE would be:

/* For IE browser */
input:-ms-input-placeholder {
   /* Your style here e.g. font size, color etc */
}

/*For Webkit browsers (Chrome, Safari) */
input::-webkit-input-placeholder {
   /* Your style here e.g. font size, color etc */
}

/* For Mozilla Firefox */
input:-moz-placeholder {
    /* Your style here e.g. font size, color etc */
}

Upvotes: 3

Ilja
Ilja

Reputation: 46479

Try this in your css

/*For Webkit browsers (Chrome, Safari) */

input::-webkit-input-placeholder {
   /* Your style here e.g. font size, color etc */
}

/* For Mozilla Firefox */

input:-moz-placeholder {
    /* Your style here e.g. font size, color etc */
}

Upvotes: 11

Shyju
Shyju

Reputation: 218702

how about increasing the font size of the class domain to some legible font size ?

.domain
{
  font-size : 14px;
}

Upvotes: 0

Related Questions