CSS Tables for layout - sidebars push down through footer

I’m currently re-working an old site:

Header and horizontal navbar
Main section comprising left bar, content, right bar - laid out using CSS table rules

Problem: on a page with short content the right bar pushed down below the footer.

Why: I had three navbars, all using the same class name. The top one was horizontal and the others, in the side bars were vertical. I’d set a height to the horizontal one. The vertical ones looked OK except on a page with short content.

Solution: set the height of the vertical navbars to “auto”.

Took me ages to find the problem - so I thought I’d share it.