I am currently working on an ASP.net c# project. I am trying to move a div container to be placed on top of an ASP grid view.
If I set in the style sheet top: 100px; it places the div over the top of the grid view which I want. However, the position needs to be done using Javascript. I use the following code to position the div.
var obj = document.getElementById("software_" + id);
obj.style.top = "80px";
If I use the following code it doesn’t place the div in the same place that the stylesheet places it, it jumps to underneath the grid view, as if in java script its trying to avoid containers overlapping.
How can I fix this problem so that the Javascript can place the div over the top like the stylesheet is able to.
Found the answer eventually, it was something to do with the positioning of other divs so I had get the mouse position minus so many pixels in order. Below is the Javascript that I used to do the positioning.