I have two columns side by side. The column on the left contains HTML that I cannot control. On the right side, I need to display a comment box that should align with the text clicked on the left hand side.
Is it possible to position an element absolutely in relation to a non-sibling?
Example: https://jsfiddle.net/ark51cLu/4/
<div class="container">
<div class="left">
<div class="box1">
<div class="inner-html-box">
<p onclick="clicked(event)">Item 1</p>
<p onclick="clicked(event)">Item 2</p>
</div>
</div>
</div>
<div class="right">
<div id="comment-box" class="box2">Item 1 comments</div>
</div>
</div>