Have you had a look at the generated html (View, Page Source or
similar in browser) to see if it looks ok?
Also try copying the complete source and pasting into html checker at
http://validator.w3.org/#validate_by_input in case something else on
the page is messing it up and confusing the browser.