.cnt {
display: flex;
}
.one {
background: #ff0000;
width: 300px;
}
.two {
background: #00ff00;
flex: 1;
}
<div class="cnt">
<div class="one">
Center me
</div>
<div class="two">
And me
</div>
</div>
Is there a way to align this text horizontally without using additional divs? I could add another div and style it accordingly, but I'm looking for a more elegant solution. Can this text be aligned horizontally in a classy way?