Saturday, March 24, 2012

HTML Decoding

Hi Gang,

I have text that I am putting into a label that has been custom formatted by
a text editor and looks like this:

Some outside text <crl>Some inside text</clr Some outside text

How can I map this to an item in a CSS file so that I can use it to format
the 'Some inside text' portion of the text?

Thanks.

SteveWell I dont think you can map it to CSS without changing it to something CSS
can identify against. So, before you add the text to the label do a string
replace on the crl so it becomes a DIV and manipulate the DIV as you would
any div from CSS. Of course you'll need to close the DIV correctly also.

So:
Some outside text <crl>Some inside text</clr Some outside text
becomes
Some outside text <div class="crl">Some inside text</div Some outside text

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Uriah Piddle" <stephenprescott@.msn.comwrote in message
news:u10TlMoMHHA.5012@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi Gang,
>
I have text that I am putting into a label that has been custom formatted
by a text editor and looks like this:
>
Some outside text <crl>Some inside text</clr Some outside text
>
How can I map this to an item in a CSS file so that I can use it to format
the 'Some inside text' portion of the text?
>
Thanks.
>
Steve
>


Thanks John.

"John Timney (MVP)" <x_john@.timney.eclipse.co.ukwrote in message
news:hsCdndgnoeim0jzYnZ2dnUVZ8tqqnZ2d@.eclipse.net. uk...

Quote:

Originally Posted by

Well I dont think you can map it to CSS without changing it to something
CSS can identify against. So, before you add the text to the label do a
string replace on the crl so it becomes a DIV and manipulate the DIV as
you would any div from CSS. Of course you'll need to close the DIV
correctly also.
>
So:
Some outside text <crl>Some inside text</clr Some outside text
becomes
Some outside text <div class="crl">Some inside text</div Some outside
text
>
--
Regards
>
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
>
>
"Uriah Piddle" <stephenprescott@.msn.comwrote in message
news:u10TlMoMHHA.5012@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

>Hi Gang,
>>
>I have text that I am putting into a label that has been custom formatted
>by a text editor and looks like this:
>>
> Some outside text <crl>Some inside text</clr Some outside text
>>
>How can I map this to an item in a CSS file so that I can use it to
>format the 'Some inside text' portion of the text?
>>
>Thanks.
>>
>Steve
>>


>
>

No comments:

Post a Comment