I wish to display some text dynamically below a series of images. I need to get the position of each image, and so I require some way of getting the position of an image in relation to the div holding the images.
I managed to get the position of the image in relation to the entire page, but this was no good for my purposes.
I don’t understand why you need to get a position, but I suspect you may be on the wrong track. It would be better to tell the script simply to place the text after the image element, and let the natural flow of the content determine where that is.
EDIT: … unless I’ve misinterpreted you. Do you mean ‘position’ in terms of source order? You’d best post some code to indicate what your situation is.
If that PHP code is serving up the names into the HTML, then this is probably just a CSS issue.
Could you show us the HTML that is rendered by this code? Then we can suggest how to position the name. The PHP isn’t any use for this question (as far as I can see).
Yep, please do. Sorry I wasn’t more help. The real JavaScripters here would probably sort you out in a jiff, so just wait a little longer for a better reply.