Web Design Blog

This is where we store some of our Web Development thoughts, tips and tricks, just because we like to share.

Control Your Text Case Through CSS- Lowercase And Uppercase

Capslock

Back in the day I always used to use a programming language like PHP to control text case. And even further back in the day, I used to control the case manually, by typing ALL IN UPPERCASE, or being extra careful to use proper case.

I still use PHP some times, for example, to make every letter lowercase in PHP, I would use the function strtolower. But there’s also a very cool way of controlling the case with CSS, which I think a lot of the times people forget about (I Know I do).


text-transform: lowercase; /* force text to lowercase */
text-transform: uppercase; /* force text to uppercase */
text-transform: capitalize; /* force text to proper case */

Hopefully now I’ve written this down, I’ll remember it more often.

31 Jul 2008 / 0 Comments / CSS Tips & Tricks / by Maruf

Leave a Reply

© 2012 BrightCherry :)