I know that I can do add color
, padding
... by styling the input
. Are there vendor pseudo elements to style the text itself like there are for placeholder? I want to like translateY
the text in the input but not using vertical-align
or affecting input's height.
Asked
Active
Viewed 83 times
1
-
AFAIK, there is no way to `translateY` the actual text of an input. Try JS? – Tim Aug 15 '15 at 03:27
1 Answers
1
I've searched before, and just now searched again, but I don't believe there are any vendor pseudo elements targeting the values of text inputs like there are for placeholder text.
Being able to apply CSS transform
properties to text input values is, to the best of my knowledge, not currently possible with CSS only. There may be some way to achieve what you want with JS, but I haven't seen it done before.
This post delves into the issue, offers some creative workarounds, and may provide you with useful guidance: Is there a way to style part of an input field's value?

Community
- 1
- 1

Michael Benjamin
- 346,931
- 104
- 581
- 701