I've modified the HTML to tidy up the styling, but it's borked again.
For reference, this is what happens when I copy-paste the code into a .html file:
It does not do this when the styling is given in the divs I'm using for formatting purposes; only when I move it up into the style tag at the top and use classes.
Edit: I've done some more playing, and now the floating is completely gone. The changes have no effect in the .html file.