bskool
bskool

Reputation: 2068

Two different text styles in placeholder

Is it possible to have two styles in an input box placeholder?

Here is an example of what I'm looking for: https://i.sstatic.net/7OH9A.png

Upvotes: 4

Views: 987

Answers (2)

charlietfl
charlietfl

Reputation: 171679

Options would be use a background image that has the text, or use an element overlay with th text or put the text behingd the imput.

Here's a simple demo that places the text behind the input and hides it on focus

http://jsfiddle.net/GRsQc/1/

Upvotes: 4

cih
cih

Reputation: 1980

One solution would be to position text over the input field, obviously it can be styled as pre your example and hide the text using jquery or javascript when the text field is selected. If you want to provide some code I can be more specific.

Upvotes: 0

Related Questions