<!DOCTYPE html> <html> <head> <style type="text/css"> ul { margin: 4px; } li { float: left; } </style> </head> <body> <table> <tr> <td> <ul> <li>Test</li> <li><script>var b=document.body.offsetHeight</script>Test</li> </ul> </td> </tr> </table> </body> </html>