JavaScript EditorBest javascript editor debugger     Ajax website 



Main Page

Previous Page
Next Page

Changing the Text Case

You can define the text case for your style by using the text-TRansform property. In this way, you can display the text either with initial capital letters, in all capital letters, in all small letters, or as it was typed.

Figure 10.35. I've decided to display the level 1 header in all uppercase letters for emphasis.


To change the text case:

1.
Type text-transform:.

2.
Type capitalize to put the first character of each word in uppercase.

Or type uppercase to change all the letters to uppercase.

Or type lowercase to change all the letters to lowercase.

Or type none to leave the text as is (possibly canceling out an inherited value).

Figure 10.36. Now the header really stands out.


Tips

  • I'm unimpressed with the capitalize value. While I sometimes need to capitalize all the important words in a sentence, or even just the first word in a sentence, I am hard pressed to think of an example where I'd need to capitalize everything. Now, a true headline-style capitalization property would be welcome. Of course it would have to be language dependent.

  • The lowercase value can be useful for creating stylish headers (or if you're e.e. cummings).

  • The text-transform property is inherited.



Previous Page
Next Page


JavaScript EditorBest javascript editor debugger     Ajax website