Schannah
04-14-2006, 05:12 PM
I know this may seem a bit of an obscure question, but does anybody know of a way in which I can automatically isolate the initial of a word using HTML and/or CSS?
If it helps at all, the context is that the word will be a variable name, i.e. the username of the person who most recently visited a certain page (e.g. John). I want to find a way of coding it such that I can show just the initial of the word (e.g. J). If this is a viable solution I can code it such that the word is all in lowercase other than the initial letter and then isolate and use the only capital letter in the word, but then obviously I would need a method to isolate the capital.
I'm doing a Gorey-based layout and as an end result, I want to be able to have a section that goes something like:
"J is for John smothered under a rug"
where John is the variable username, and J is the automatic initial. In the layout I will only be able to input the variable of the name itself so I need to code the rest.
I probably haven't explained this very well. Anybody who has any idea what I'm talking about, though: please help!
-- Hannah
If it helps at all, the context is that the word will be a variable name, i.e. the username of the person who most recently visited a certain page (e.g. John). I want to find a way of coding it such that I can show just the initial of the word (e.g. J). If this is a viable solution I can code it such that the word is all in lowercase other than the initial letter and then isolate and use the only capital letter in the word, but then obviously I would need a method to isolate the capital.
I'm doing a Gorey-based layout and as an end result, I want to be able to have a section that goes something like:
"J is for John smothered under a rug"
where John is the variable username, and J is the automatic initial. In the layout I will only be able to input the variable of the name itself so I need to code the rest.
I probably haven't explained this very well. Anybody who has any idea what I'm talking about, though: please help!
-- Hannah