I've tried to search around for some answers, but still haven't found any.
Basically what I'm trying to do is center my green box within my blue box.
The blue box is 100%, the green is 80%, and I figured I'd just give my green box a margin-left of 10%, but for some reason it doesn't seem to work.
Here's a screenshot of what I'm talking about -- https://imgur.com/xaPttJM
#content_wrapper {
height: 30rem;
width: 100%;
background-color: blue;
position: relative;
margin: 0;
}
.content {
height: 30rem;
width: 80%;
background-color: green;
position: absolute;
margin-left: 10%;
display: inline-block;
}
<div id="content_wrapper">
<div class="content">
</div>
</div>
I've usually been able to do this before, but I must be missing something somewhere.
Thanks in advance!