Dynamic Text-Width in CSS/Javascript

I have an input field, and as the user types, I need to to move a span directly underneath it.

I’ve got the span directly below it using “making the absolute, relative,” but I’m stuck with getting it directly under the position of the last key pressed.

Is this possible, or am I dreaming?