How can select inside ::placeholder a letter like "*" to set vertical-align

How can select inside ::placeholder a letter like "*" to set vertical-align
0

#1

To it?

Any idea?

Thanks.


#2

I can’t guess what it is you are asking. Can you rephrase or give examples or pictures of what you are doing?


#3
::placeholder
{
color: red;
}

<input placeholder="This is red but char wanna set vertical align for -->*<--">

inside placeholder or how can select that? any idea?


#4

You don’t have access to it like a DOM text node, so you can’t.

Why though, what’s the usecase? You’re not supposed to do anything fancy with them, they’re just a nice extra. And the placeholder is inaccessible, you’d generally use the label for the input to provide cues


#5

I wanna something when user enter in placeholder then hide the char * or something but thanks.


#6

Anything in the placeholder will disappear when a user enters the text anyway.

What you i think want is possibly doable, you can’t use a placeholder attribute though, you have a text node that sits over the top, and you’d use JavaScript to make it act the same as a placeholder. Gets very fiddly though, for little benefit