View Full Version : Insert a word from CSS or another tag

Tony M
08-26-2010, 06:04 AM
I want to insert a word by adding a html tag (or css) without writing it again and again (like CSS Content http://www.w3schools.com/Css/pr_gen_content.asp or like PHP Include function if You want... ): For example:

<p> Tony is here and is going to his town and there is a long way which is a long road...</p>

so I want the "is" that is repeated 4 time above to be inserted from a CSS, or from one source in the same html, so that the new code will appear like:

<p> Tony <the_code_that_will_insert_is> here and <same_code_that_will_insert_is> going to his town and there <same_code_that_will_insert_is> a long way which <some_code_that_will_insert_is> a long road...</p>

so that I can edit the word is by changing one CSS (externally) or by changing ONE tag in the html ( is can be edited from another file like CSS or in the same file (in the <style> tag in the <head> of the document) so that I can replace is by or (for example) by only changing one CSS rule...))

So how can I do this?
If there is another way please tell about it :thumbsup:

08-26-2010, 06:11 AM
CSS was never really meant for content. Its support is minimal. I suggest using some kind of include or create a template and replace the text with the word you want or like you said include the file where needed.