how to align items to the center in css code example
Example 1: how to align items in css
div
{
display:flex;
align-items:center;
justify-content:center;
}
Example 2: align items center css
.parent_div
{
display:flex;
align-items:center;
}
Example 3: center a div
<div id="outer">
<div id="inner">Foo foo</div>
</div>
//css:, demo with border
<style>
#inner {
display: table;
margin: 0 auto;
border: 1px solid black;
}
#outer {
border: 1px solid red;
width:100%
}
</style>