Added logic to return the size of the wrapper div instead of the body size if it's bigger