I am creating a simple p5.js canvas using the values from it’s parent, which takes up exactly half the screen. When I add the canvas which has the exact size as my html , body and #musicscape elements, a vertical scrollbar is added (tested on Chrome) but I cannot figure out why or how to get rid of it.
The only way to remove it is to set the canvas width to $musicscape.outerHeight() - 3 which also creates a small white line at the bottom that isn’t part of the canvas. How can I get rid of the vertical scrollbar while keeping the canvas to the size of its parent?
Replacing createCanvas with windowResized creates a lot more problems and doesn’t actually do anything to the scrollbar, unless I don’t understand what you mean.
Actually you’re right @GoToLoop , it adds responsiveness which is great but it doesn’t fix my issue. I did fix it using an overflow: hidden on my body but I don’t really like that solution.