I'm trying to create an Etch-a-Skecth in in HTML, CSS and javascript. So I created a <div>
and inside it, there's another one.
But when I tried to style it in CSS, I couldn't center it.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#bigGrid {
display: grid;
grid-template-columns: repeat(16, auto);
grid-template-rows: auto;
padding: 50px;
width: 80px;
height: 80px;
border: 10px solid crimson;
}
.gridElement {
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(0, 0, 0, 0.8);
padding: 5px;
background-color: rgb(184, 179, 179);
}
<div id="bigGrid">
<div class="gridElement"></div>
</div>