Pre-alpha
Pre-alpha

Reputation: 295

Is it possible to add a pseudo after selector to the placeholder of an input

I'm trying to add a font-awesome icon to the end of a placeholder text, I know that this method works, but it lead me to wonder whether adding Font awesome content code via the css will work.

Is something like this possible:

input::-webkit-input-placeholder::after

Upvotes: 0

Views: 1546

Answers (1)

Justinas
Justinas

Reputation: 43499

input::-webkit-input-placeholder::after is not valid, because input does not have inner content - there is no :before and :after.

You can't select pseudo-element of pseudo-element. So input:placeholder:after will select :after of input

Upvotes: 1

Related Questions