1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<!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>