dir="rtl" style="border: 1px solid red;">
  <div dir="rtl" style="position: relative; overflow: auto; width: 150px; height: 100px; border: 1px solid black;">
    <div style="height: 200px;">
      <span id="anchor5">Anchor 5.</span>
    </div>
    <div id="popup5">
      Popup.
    </div>
  </div>
</div>

<iframe id="iframe-standard" src="positioning_test_standard.html" class="anchorFrame">
</iframe>
<iframe id="iframe-quirk" src="positioning_test_quirk.html" class="anchorFrame">
</iframe>
<div id="popup6">