When using window.open()
to open a popup window, the popup window is opening slightly to the right of the window I am opening the popup from. It lines up directly left with the body
when margin is not removed but I have set my css like so:
body{
margin: 0px;
padding: 0px;
}
I have also tried to set left=0px
in my window.open
function.
Here's my JS code:
var windowSize = "width=" + window.innerWidth + ",height=" + window.innerHeight + ",left=0px";
window.open('http://www.google.com/', 'popup', windowSize);
Anyone know why this is occuring? Is there any solution to alleviate this problem?
Here's my jsfiddle.
UPDATE
Here you can see that you can see some red to the left of the popup: