It works in every browser except Edge. Is there a pure CSS workaround?
input { text-align: center }
<input placeholder="placeholder" />
You can use the ::placeholder pseudo-element to change the styles of the placeholder text, which includes the ability to change the background.
Nice find, Tamás! This appears to be a bug with our form controls. Note that the cursor respects the instruction when there is no placeholder, but falls back to left-alignment when there is a placeholder. This seems very unintentional, and worth digging into.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With