Updated markup, JS and stylesheet

Markup is updated to include the <tfoot> element, but it is hidden by
default (because we don't need it). JS is fixed to account for incorrect
positioning in some cases.