I've been struggling to center the box on my page through coding. Despite trying numerous solutions I found online, it still doesn't work. Below is my current CSS code:
.boxbg {
position: center;
width:100%;
height:100%;
top:1em;
left:1em;
bottom:1em;
right:1em;
margin: auto;
align-content: center;
}
.bgcolor {
position:absolute;
width:100%;
height:100%;
top: 0em;
left:0em;
bottom:0em;
right:0em;
background-color:#000000;
opacity:0.5;
}
.boxbg1 {
position: absolute;
width: 50%;
}
.box {
width:26.50em;
height:30em; /*Height of whole thing*/
background:#ffffff;
border:0.063em solid grey;
padding:1.250em;
border-radius:10.625em; /*-webkit-*/
border-radius:0.625em;
box-shadow:#333 0.313em 0.313em 0.125em;/*-webkit-*/
margin-left: 50%;
margin-right: 50%;
margin-top: auto;
text-align: left;
} `
I'm currently utilizing Visual Studio Code and then uploading the file to Chrome for testing purposes.