Take the 2-minute tour ×  Can anyone please tell me how to do
this, right now when i click an image in my website a menu opens
up right under the image but when I resize the window the menu
stays where were it popped out initially but the image moves, so
how can i position this menu under the image without using
window.resize or jquery resize events. This is the code i have
right now      "left": ($("#menu").offset().left +
($("#menu").width()/2)) + "px",     "top":
($("#menu").offset().top + $("#menu").height()) + "px",
share|improve this question Today my mystical powers are not
that good. So you will need to post a little bit more of what
you have done. –  Sven Bieder Mar 21 '12 at 20:57 Have you tried
position:relative instead of position:absolute? –  Surreal
Dreams Mar 21 '12 at 20:57 relative wont work because when i
click on the image the menu should open below that image, which
currently does but whats happening is when i resize the window,
the gap increases between the image and menu. –  user1284460