Tips on Debugging Layouts

The first step in debugging should always be making sure that your code
is valid. In other words, make sure your [X]HTML and CSS code don't have any
errors that might be causing the problem. (Be aware that the validators don't
detect all errors that can cause problems, but they are still useful tools.)

Put contrasting background colors on elements to see where they are.
Some people recommend the use of borders for this same purpose, but since
borders affect the total width an element takes up, I recommend using
background colors instead. The outline property could also be used, however, IE versions
before 8 (excluding the very old IE5 for MacOS) don't support it.