Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2010
    Posts
    132
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question Insert a word from CSS or another tag

    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:

    Code:
    <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:

    Code:
    <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?
    OR
    If there is another way please tell about it

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •