I have a bunch of images each with the float: left
property applied to them. They are constrained withing a 400px
width area, forcing them into a grid of 4 X 4. If i try to get the position of them, they are always incorrect. What is causing this? You can see what I'm trying to do here: http://dev.redemptionconnect.com/cards/browse. Click one of the images to see what I mean. the dialog that pops up should be over the image you clicked.
The way I see it, you should be checking the offset of the actual floated elements: the underlying <img>
. They are in fact detached from the inline layout nature of the links when floated, leaving the links at top:0;left:0
.
You could as well, get rid of the <a>
and apply that click event to the images. Or float:left
the <a>
, whatever your prefer.