diff --git a/src/core/canvas.js b/src/core/canvas.js index 2da95ecf..f63f9fd0 100644 --- a/src/core/canvas.js +++ b/src/core/canvas.js @@ -12,11 +12,12 @@ var SceneJS_Canvas = function (id, canvasId, contextAttr, options) { // Automatic default canvas canvasId = "canvas-" + id; var body = document.getElementsByTagName("body")[0]; - body.innerHTML = ''; var newdiv = document.createElement('div'); newdiv.style.height = "100%"; newdiv.style.width = "100%"; - newdiv.innerHTML = ''; + newdiv.style.padding = "0"; + newdiv.style.margin = "0"; + newdiv.innerHTML += ''; body.appendChild(newdiv); }