I’ve got an ASP.NET page with a master page, which for whatever reason causes top:0; left:0 to be just under the master page. Inspecting my generated DOM, I’ve found that <body> is at the very top of the page, where I need to position the <div>. How can I use JQuery to position my <div> at the exact same location as my <body> tag?
I’ve got an ASP.NET page with a master page, which for whatever reason causes
Share
The reason that
top:0would not actually be the top is that the div must be contained within an element which hasposition: relativeorposition: absolute(more likely, relative).The easiest way to fix this would be to append the div directly to the body.