I am trying to center #left
and #center
inside #wrapper
like this:
I am trying to get #center
to be in the actual center of #wrapper
both horizontally and vertically, and that #left
will be in a slight margin to his left. How do I achieve that?
.c {
border: 1px solid black;
margin-left: auto;
margin-right: auto;
width: 60vw;
height: 80vh;
margin-top: 13vh;
}
#wrapper {
height: 13vh;
margin-top: 2vh;
border: 1px solid blue;
}
#center {
display: inline-block;
width: 12vw;
height: 10vh;
border: 1px solid red;
}
#left {
display: inline-block;
width: 13vh;
height: 13vh;
border: 1px solid green;
}
<div class="c">
<div>content content content</div>
<div>content content content</div>
<div id="wrapper">
<div id="left">left</div>
<div id="center">center</div>
</div>
<div>content content content</div>
<div>content content content</div>
Jsfiddle: https://jsfiddle.net/y6r585jk/2/