Write Text on Image

Discussion in 'JavaScript' started by anhtin, Apr 12, 2007.

  1. #1
    hi all
    I want to write Some text on my Image by javacript
    Some body show me ??????:confused:
     
    anhtin, Apr 12, 2007 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Is the javascript important for you? That text won't be recognised by search engines. I suggest you to use css for that purpose.
     
    Bagi Zoltán, Apr 12, 2007 IP
  3. anhtin

    anhtin Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i only write front image :D
    can u show me
     
    anhtin, Apr 12, 2007 IP
  4. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #4
    How about this: using CSS positioning methods to overlap HTML texts over your images
     
    ajsa52, Apr 12, 2007 IP
  5. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #5
    Set the image into a div as background with the following css code.. For instance:
    <div class="img"><p class="t">text on the image</p></div>

    .img{
    width:100px; (same as the image width)
    height:50px; (same as the image height)
    }

    t.{
    margin:auto;}
     
    Bagi Zoltán, Apr 12, 2007 IP
  6. anhtin

    anhtin Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thank reply to me
    i want write text is dymamic by java cript
    ex: i have textbox and have some text
    When i click on the image this text will view on this position so clicked mouse
     
    anhtin, Apr 13, 2007 IP
  7. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #7
    That, or you could define a div to use the image as background, then you can add your text "above" the image easily.
     
    Clive, Apr 13, 2007 IP