I would like to center my two blue boxex shown in the example below using CSS Flexbox. I tried to center them with both align-items: center; and justify-content: center; but it is not working.
Thanks for the help.
body {
margin: 0;
padding: 0;
}
#container {
width: 100%;
height: 500px;
background-color: green;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
#first {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
display: inline-block;
background-color: red;
}
#loadingBar {
width: 100%;
height: 20px;
background-color: purple;
}
#inner {
width: 50px;
height: 50px;
display: inline-block;
background-color: blue;
}
<div id="container">
<div id="first">
<div id="inner"></div>
<div id="inner"></div>
</div>
<div id="loadingBar"></div>
</div>