When creating a fillwidth p5 cnavas, i get some weird border around the edge. How do i get rid of this? Or more precisely what might cuase such an issue.
var sketch = function (p) {
with(p) {
p.setup = function() {
createCanvas(window.innerWidth, 400);
};
p.draw = function() {
if (mouseIsPressed) {
fill(0);
ellipse(mouseX, mouseY, 80, 80);
}
};
}
};
let node = document.createElement('div');
window.document.getElementById('p5-container').appendChild(node);
new p5(sketch, node);
body {
background-color: lightgrey;
overflow: hidden;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.js"></script>
<div id="p5-container"></div>
<div id="conatiner">
<h1>My Website</h1>
<h2>It is all coming together.</h2>
</div>