<div class="container">
<p class="item">1</p>
<p class="item">2</p>
<p class="item item--head">Head</p>
</div>
xxxxxxxxxx
.container {
display: grid;
grid-template-columns: [head-start] 50% 50% [head-end];
grid-template-rows: [head-start] auto [head-end] auto;
}
.item--head {
grid-area: head;
}
/* ETC (Formatting only): */
body {
margin: 1.5em;
font-size: 130%;
font-family: sans-serif;
background: #F2F0EC;
color: #2E2C08;
}
.container {
border: 10px solid #2E2C08;
background: white;
padding: 1em;
}
.item {
padding: 0.5em;
text-align: center;
color: #2E2C08;
background: #e5e3de;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
text-align: center;
}
.item--head {
color: white;
background: #2E2C08;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.