I have a image centered on the screen. I need to display some text above the image and I want to set the text coordinates relative to image.
If a user have a different resolution:
- The image always located on the top and center of the browser.
- The text will be on the same position in the image.
I have tried:
<style type="text/css">
#l1 {
position: relative;
left: 20px;
top: 30px;
color: #03C;
}
</style>
<div align="center">
<div id="l1" align="left">
some
</div>
<img src="some.jpg" width="1024" height="788" />
</div>
But it doesn't work. How can I achieve my goal?