Fixed box model calculations so that the plugin can handle containers and images with borders, margins, and padding.