<section>
<div class="foo">Foo!</div>
</section>
section {
// Make the example a little easier to see.
// Flex is not necessary to make this work.
display: flex;
flex-flow: row nowrap;
justify-content: center;
padding: 2em;
}
.foo {
border: 15px solid #efefef;
box-sizing: border-box;
height: 300px;
width: 300px;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.