<!DOCTYPE html> <html> <body> <span style="display:table"> <span style="display: table-cell"> Cell 1 </span> <script type="text/javascript">document.body.offsetWidth</script> <span style="display: table-cell"> Cell 2 </span> </span> </body> </html>