Here is my HTML:
<a href="#" class="link">small caps</a> &
<a href="#" class="link">ALL CAPS</a>
Here is my CSS:
.link {text-transform: capitalize;}
The output is:
Small Caps & ALL CAPS
and I want the output to be:
Small Caps & All Caps
Any ideas?
captialize
only effects the first letter of the word. http://www.w3.org/TR/CSS21/text.html#propdef-text-transformI was not able to comment for Harmen because of lack of reputation so writing again the same answer of harmen. I have added LowerCase() to the answer so it can convert "ALL CAPS" to "All Caps".
Convert with JavaScript using
.toLowerCase()
andcapitalize
would do the rest.