<html> <body style="display: inline; position: relative;">ع <span id="a" style="position: absolute;">ع<span style="position: absolute;"></span></span> <script> document.body.offsetHeight; document.getElementById('a').setAttribute('style', ''); </script> </body> </html>