<!doctype html> <html> <head> <style type="text/css"> div { display: table; } div div { float: left; width: 200px; border: 2px solid #000; } </style> </head> <body> <div> <div>First float</div> <script type="text/javascript">b=document.body.offsetHeight;</script> <div>Second float</div> </div> </body> </html>