| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Text-transform all uppercase to regular capitalization |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
what sarah said
|
Text-transform all uppercase to regular capitalization
With text-transform you can get the text to go all uppercase, all lowercase or capitalized. Capitalize makes sure that the first letter is capitalized on each word but is it possible to transform an all Uppercase set of text to Capitalized (i.e. first letter capitalized with the rest lowercase?) Thanks! |
|
|
|
|
|
#2 (permalink) |
|
Semantics, yay.
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,126
|
If you had this: <p>HELLO, HOW ARE YOU, WHAT'S HAPPENING?</p> and threw this CSS at it: p {text-transform:capitalize;} ...it should become capitalized (first letter is uppercase, rest aren't). You're saying this isn't the case? |
|
|
|
#7 (permalink) | |
|
what sarah said
|
Quote:
It's monthly data that I receive from the client for stats on their sales reps and there are almost 200 names so I'd need to manually change those each month.... just wondering if there was a CSS solution. Not a huge deal though - all Caps works too! haha |
|
|
|
|
#8 (permalink) |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,968
|
How are you bringing in or storing the data? Would it not be possible to transform the names at the point of entry (as they are added to the storage file or db)? Alternatively, if you're using a server-side language to loop through the names when creating the surrounding markup, it's a simple thing to convert them into the appropriate casing. Better, imho, to get certain data in the right casing at storage level, rather than needing to fiddle about with it during the page view. The (potential) issue with using CSS is that, whilst it is presented correctly, the underlying text isn't really transformed. If you selected and copied CSS text-transformed text, the copied text would still be in its actual/natural casing, not that set by the CSS. Similarly, if you're manipulating it via the DOM, the casing will still be that of how it appears without CSS. Neither is a deal breaker. It's just more to have to bear in mind. |
|
|
|
#9 (permalink) | |
|
Semantics, yay.
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,126
|
Quote:
|
|
|
|
|
#10 (permalink) | |
|
what sarah said
|
Quote:
Some good thoughts Bill. Thanks! The data is being copied in from Excel which has been dumped from a Access Database. We had originally proposed to put all the data into a MySQL database, but the client didn't have the budget to do that so I'm just doing a quick Copy and Paste of the tables. I'll look into using PHP to do the trick. If it takes a lot of time each month it's not fitting budget wise... Thanks! |
|
|
|
|
#11 (permalink) | |
|
what sarah said
|
Quote:
Thats a good thought too Thanks though! |
|
|
|
|
#12 (permalink) | |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,968
|
Quote:
The PHP is relatively simple. At the data entry end, it wouldn't be too hard to set up a page with a form (w/ textarea) into which you could paste the names after you'd copied them Excel. The form could then be submitted and the output could be used to generate a formatted, case-corrected text file containing the names. At the other end, PHP could be used to pull in the names from that file and insert them into your markup however you choose. Something to consider. |
|
|
![]() |