Take into account padding and margins on content

Changed the height and widths calculations of the content div to
include any padding and/or margins.

There is also some strange behaviour when the container has padding and or margins, which I am still looking into.