homepage Welcome to WebmasterWorld Guest from 50.17.79.35
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
I had a problem with text-transform.
cute_kalith




msg:4355464
 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...

 

lucy24




msg:4355474
 9:27 am on Aug 26, 2011 (gmt 0)

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.

alt131




msg:4355676
 8:39 pm on Aug 26, 2011 (gmt 0)

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)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved