I think you are missing a </div> in there somewhere, which could be causing the CSS to "leak" out into the rest of the page. (This would be a pretty serious bug in the parser, if it is the case.)