CSS text-transform 'capitalize' is accidently capitalizing letters after an apostrophe

Here is my code, it is written in JSX:
<h3 style={{textTransform:'capitalize'}}>{id}'s Posts</h3>

Any suggestions? Thank you!!

I believe if your id finishes with a number then the ‘s’ will be capitalized.

You could force the issue and over-ride it with a span.

e.g.

<h3 style="text-transform:capitalize">fred4'<span style="text-transform:none">s</span> posts</h3>

3 Likes

I’ll try this out, thanks!!

1 Like

It worked, thanks again!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.