Tooltip Possitioning problems
-
Hello peeps I have a problem setting my tooltip spacing on my page, i am using this to get the spacing. function ShowDivBox(sendingTD, innerMessage) { newdiv = document.createElement('div'); newdiv.style.position = "absolute"; newdiv.style.top = 273 + sendingTD.parentNode.parentNode.parentNode.parentNode.parentNode.offsetTop + 20; newdiv.style.left = sendingTD.parentNode.parentNode.parentNode.parentNode.offsetLeft + 25; newdiv.style.zIndex = "5000"; newdiv.style.paddingLeft = "10px"; newdiv.style.paddingTop = "10px"; newdiv.innerHTML = innerMessage; newdiv.id = "divAddWord"; sendingTD.appendChild(newdiv); } function RemoveAddWord(sendingTD) { if (newdiv) { var id = newdiv.id; var oldDiv = document.getElementById(id); if (oldDiv) sendingTD.removeChild(oldDiv); } } but the problem is when i scroll down in the grid view the grid height makes the tooltip display out of site on the bottom of the page, then more i scroll down on the scroll bar the further down it goes is there anyone who could help me with the correct syntax to subtract the scroll height of my code?