Welcome to WebmasterWorld Guest from 54.146.180.94

Forum Moderators: not2easy

I had a problem with text-transform.

   
8:55 am on Aug 26, 2011 (gmt 0)



I had a problem with text-transform.

for example:

HELLO WORLD

Web Master

.......

i need to want only capitalize ...how to rectify in CSS...
9:27 am on Aug 26, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



It is not easy to know how to answer when you don't show your current CSS and HTML. For starters, do you mean Capitalize (in non-CSS contexts this is often called Title Case) or do you mean UPPERCASE?

Note that Capitalize behaves differently from the other two:
Puts the first character of each word in uppercase; other characters are unaffected.

In other words, "capitalize" will not change an original capital letter into lower-case; only "lowercase" will do that. No, you can't cheat by wrapping a "capitalize" around a "lowercase" (I tried).

It may help to backtrack and explain what you're trying to do. Is your original text in ALL CAPITALS? How did it get that way? If you're dealing with user input, you may be able to fake-up "Sentence case" by putting a "capitalize" tag around the first letter and a "lowercase" around the rest. But that's pretty clunky.
8:39 pm on Aug 26, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi cute_kalith and welcome to WebmasterWorld :)

As Lucy explains, what you need will depend on your exisiting content and your desired output, but you seem to be wanting 16.5 text-transform. [w3.org] which has four values:
  1. capitalize (capitalise): Puts the first character of each word in uppercase; other characters are unaffected.
    eg my text --> My Text
  2. uppercase: Puts all characters of each word in uppercase.
    eg my text --> MY TEXT
  3. lowercase: Puts all characters of each word in lowercase.
    eg My TEXT --> my text
  4. none: No capitalization (capitalisation) effects. (default)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month