Trying to figure out how to position a div at the end of an h4
text element has been challenging. When the h4 text is on a single line, it's easy to place the div correctly. However, things get complicated when the text spans multiple lines. In that case, the div ends up at the width of the first line instead of next to the last word on the second line.
Is there a way to align the position of the div with the last word of the h4 element? This way, even if the text wraps onto two lines, the div will always be close to the last word.
I've attached an image to better illustrate what I'm trying to achieve: I need to implement solution "B." Here's the link to the image for reference: https://i.sstatic.net/uZNpi.png