I've been working on developing an HTML5 drawing app, and while I have all the functionality sorted out, I'm facing challenges during the design phase. My main issue is centered around trying to make everything look visually appealing. Specifically, I want to center my drawing board within a div container. However, when I apply CSS styles to the container, it ends up moving the container but also pushes the drawing board/canvas outside of its boundaries, resulting in it being off-screen and away from my drawing cursor. Is there a way to ensure that everything moves together seamlessly and correctly? Your help would be greatly appreciated. Please note that there's quite a bit of code involved.
<div class="snippet" data-lang="js" data-hide="false" data-console="true">
<!-- Code snippet here... -->
<div class="col-md-8 canvas-boards" style="margin-left: -6px; margin-top: -33px;">
<canvas id="board" width="438" height="440" style="z-index: 0;"></canvas>
<canvas id="board2" width="438" height="475" style="z-index: 1;"></canvas>
</div>