ruler

This element width is set to 400 pixels. On each side of the box, the padding is 20 pixels and the border is 6 pixels, so now the total width of the element is 452 pixels. With the addition of 30 pixels of margins each side the element, the total width claimed by this element is 512 pixels.

A code example from Stylin’ with CSS, Third Edition by Charles Wyke-Smith. Visit stylinwithcss.com for more CSS information and updates.