We have html that is generated by a third-party which is periodically updated so a javascript solution won't do.
Here is an example of the generated html:
<div class="label">
<div class="asterisk">*</div>
I am a text node
</div>
Which (without css) renders like:
I'm trying to align the asterisk to the end of the text node which I've achieved with the below css...
.label {
display: flex;
flex-direction: row-reverse;
justify-content: flex-end;
}
Result:
However, the problem occurs when the text node wraps onto the next line...
Desired result...
Update
Adding align-items: flex-end; is a closer result!
Update 2
From @OMi Shah's comment adding flex-wrap: wrap-reverse; is close but not quite there...





