<div class="wrapper">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">:last-child</div>
</div>
.wrapper {
border: 1px solid blue;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 50%;
.item {
width: 100%;
background: #bdf3e1;
text-align: center;
&:not(:last-child) {
margin-bottom: 30px;
}
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.