Is it possible to set a margin-left using a variable in JavaScript? If so, how can this be accomplished?
The margin left should be equivalent to the clientWidth of the text:
let hoverBubble = document.getElementById(id);
let linkWidth = link.clientWidth + 1;
hoverBubble.style.margin-left = linkWidth + 'px';