<html> <head></head> <body> <div style="position: absolute;"><input id="input" type="file"></div> <script> document.body.offsetHeight; document.getElementById("input").style.position = "absolute"; </script> </body> </html>