jquery, position 'close icon' div in the top right of a large image

Posted by Blankman on Stack Overflow See other posts from Stack Overflow or by Blankman
Published on 2010-05-25T15:11:21Z Indexed on 2010/05/25 15:21 UTC
Read the original article Hit count: 177

Filed under:
|
|

My webpage has a large image (a map). I want to position, at the top right of the image, a small icon that is for closing the map.

How can I figure out the position and place the image appropriately?

The image has a fixed width of 900 x 600.

I have jquery on the page if that helps.

I tried using $("#map").position and I have the top and left, but not sure how to position to the top right.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery