Jump to content

Opera And Chrome Offsettop Problems


MrFish

Recommended Posts

I've made a drop down menu that uses offsetLeft and offsetTop to position the dropdown menu. It works in Firefox and Safari but not Opera or Chrome (haven't tried IE yet because it's got other problems). In chrome and opera, offsetLeft works fine, but offsetTop does not.Right:menuright.pngWrong:menuwrong.pngCode:

	function displaymenu(){	button = document.getElementById("menubutton");	left = button.offsetLeft + "px";	top = button.offsetTop;	top = top + 25 + "px";	menu = document.getElementById("menudropdown").style;	menu.top = top;	menu.left = left;	menu.visibility = "visible";}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...