I'm currently trying to capitalize the very first letter from an input.
Here's what I tryed :
fieldset input
{
text-transform:capitalize;
}
But it doesn't work the way I want, as every word is capitalized.
I also tryed this :
fieldset input:first-letter
{
text-transform:uppercase;
}
But it seems <input /> doesn't work at all with first-letter...
Anyway, do you have any idea of how to achieve this without javascript (or as little as possible) ?
JS: str.charAt(0).toUpperCase();
Impossible. It is possible with Javascript, or by putting only the first word within a span.
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