The fun part was, that the code did work properly for Safari, after having it properly formated with my HTML-Editor. He didn't change a word. He added only <TAB>'s and <CR>. :) But if I said him to compress the code, the overlapping was there.
The syntax check did mention many errors, but the 3 biggest ones were the same you mentioned (that why I said, you were not wrong) and one more: the missing </table>.
That's what I did.