I am trying to capitalize the first letter of each word. I did search for it but i did not get it, is it possible in CSS?
My Code currently works for the first lette
There is no way of doing this with CSS alone if the text in the element is in ALL CAPS already, the capitalize
style will not work as it only changes the case to uppercase.
example:
p {
text-transform: capitalize;
}
some text
Some text
SOME TEXT
sOME tExt
If the entire text is already in lowercase, you can style it with the element{ text-transform: capitalize; }
, but if elements are already in uppercase, the text-transform: capitalize;
will not accomplish a "title caps". You will need to insert a javascript element.toLowerCase();
on the element in question then have CSS work its magic.
However, looking at the code provided and your question, the text is already doing what you want and the css selectors don't match the element so I'm not entirely certain what you are trying to accomplish.