<div class="container">
<div class="box-1">
<h2>Box 1</h2>
<p>some text</p>
</div>
<div class="box-2">
<h2>Box 2</h2>
<p>some text</p>
</div>
</div>
.container {
display: flex;
flex-direction: row;
}
.box-1, .box-2 {
flex: 50%;
text-align: center;
margin: 20px;
padding: 20px;
}
.box-1 {
border: 2px solid green;
color: green;
}
.box-2 {
border: 2px solid blue;
color: blue;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.