Capitalize each word in a sentence filled with uppercase letters

I have a page with several uppercase strings that I want to convert to capatalized strings. I need to capitalize the first letter of each word .

If I use:

text-transform: lowercase;
text-transform: capitalize;

      

This doesn't work because only the second rule applies. Is there a workaround for this? I prefer not to use JS.

+3


source to share


1 answer


You can use the following CSS code:



p {
    text-transform: lowercase;
}
p:first-letter 
    text-transform: capitalize;
}

      

0


source







All Articles