Is it possible to eliminate extra space at the end of text using CSS (or possibly JS)? I've experimented with various display
properties, but none seem to be effective. I need to dynamically insert a blink-div
at the conclusion of a multi-line sentence. Presently, it's added beyond the boundaries of the phrase-div
encompassing the text content (which, being a div element, includes unnecessary white space). The HTML structure is as follows:
<div id="writr-div">
<div id="phrase-div"></div>
<div id="blink-div"></div>
</div>
Please refer to both images for a comparison:
Original:
https://i.sstatic.net/TNlA1.jpg
Desired effect (border and background are included for demonstration purposes):
https://i.sstatic.net/eu6bw.jpg
EDIT: I might not have clarified my request properly. This is what I am looking for (without absolute positioning, I require it to be at the end of the sentence, regardless of its length):
https://i.sstatic.net/daRmH.jpg
Thanks, Luca