HighDots Forums  

Re: Way(s) to change text?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Way(s) to change text? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Neal
 
Posts: n/a

Default Re: Way(s) to change text? - 01-03-2005 , 10:30 AM






michael <nomail (AT) example (DOT) com> wrote:

Quote:
I know it is easy to change text styles, fonts etc., using JS, as for
example below:

div id="example">Text text text</div

script...
document.getElementById("example").style.fontSize= "110%";
/script

But what way(s) exist to change the actual text itself? Eg.
dynamically
change the string "Text text text" to "Bla bla bla" ?
First, this is not a Javascript newsgroup, this is a stylesheets
newsgroup. You'd do better asking this in an appropriate group.

Second, CSS is not used to alter the content. It's role is to style
the content. Your above script would be so much easier and more
reliable to do like this:

<style type="text/css">
#example{font-size:100%;}
</style>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.