Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do I position my text in front of my image with HTML?

I've seen a couple of ways to do this, but neither is quite right for what I want.

I don't think I can use the image as the background of a table, because I'm also using it as an image map. Other parts of the image are links, but I want to be able to put text over the one part.

I also don't want the text running off the image. I want to be able to set the boundaries of where the text appears, with a scrollbar.

Can anyone help me with this?

Update:

Actually, I've just found a way to do it, but I'm not sure why it worked this time. Is the difference that this time I put the code before the image tag?

Update 2:

Okay, so the method I thought had worked didn't actually work. Once I started changing the numbers, it began moving the entire image around.

I don't think I can use Javascript or anything like that.

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Hard to give someone code that would work without seeing their code and what may be needed to do it correctly. Positioning, say, a scroll box can be done with the CSS property: position: absolute;

    Then you use one of these pairs to position it where you want the "box":

    left | top

    right | top

    left | bottom

    right | bottom Example:

    top: YY%;

    left: XX%;

    To create a scroll box where you want to contain large amount of text, set a width and height for the "box" and use:

    overflow: scroll;

    Ron

  • 1 decade ago

    Ether chop up your image into a grid, or work with layers. There are tons of good Javascript references. I recommend checking out DYNAPI.

Still have questions? Get your answers by asking now.