Syntactically, if you are unsure about the nesting of elements, there are free tools that will tell you what, if anything, is wrong. For example:
http://validator.w3.org/
Whether or not it is semantically correct is another story. You might be suffering of divitis.