I suspect this would be simpler if you just used divs instead of tables.