<div style="position:relative; width:300px; height: 300px;">test <script> document.body.offsetHeight; </script> <div style="position:absolute; right:0;"> <input style="width: 200px" value="testtesttesttesttesttesttesttest">