Looking to align text B to the right when text A and B are on the same line, but automatically aligning text B to the left if it wraps to the next line due to space constraints.
.text-left {
float: left;
/* Float to the left */
}
.text-right {
float: right;
/* Float to the right */
}
<h1>Flexible Boxes</h1>
<div class="text-wrapper">
<span class="text-left">abcfdsdfgdfgfdgfrd</span>
<span class="text-right">xyzdsffdgdfgdfgds</span>
</div>