priyakochin — 2008-06-15T10:25:38-04:00 — #1
How can I change the position of DIV over an image ?
fredda — 2008-06-15T10:38:42-04:00 — #2
One way is to add position: relative; to your image and then abosolute position the div according to it.
priyakochin — 2008-06-15T10:49:33-04:00 — #3
can u plz help with a sample code ?
fredda — 2008-06-15T11:34:10-04:00 — #4
<img src="someimage.png" alt="alternative text" style="position: relative;" /><span style="position: absolute; top: 50px; left: 50px;">Some text..</span>
centauri — 2008-06-15T19:52:02-04:00 — #5
That won't work as the div is not inside the image. Absolute positioning is relative to the nearest positioned parent.
Why not have the image as a background to the div?
tyran — 2008-06-16T03:51:47-04:00 — #6
Not sure if this applies; I needed a div to appear over a web page to 'ghost' down the background and then have another centred within this that contained the 'pop-over' content (see CRF printing and click the Callback link), is this similar to what you are trying to achieve?
john_betong — 2008-06-16T06:01:35-04:00 — #7
>>> How can I change the position of DIV over an image ?
Can you explain what you want without using terms such as DIV and image.
There may be alternative solutions of what you want positioned on the webpage.
fredda — 2008-06-16T13:04:54-04:00 — #8
Ah okay, my bad