| René Nyffenegger's collection of things on the web | |
|
René Nyffenegger on Oracle - Most wanted - Feedback
|
Margin, border and padding of boxes in CSS | ||
|
Margin
Border
Padding
Content
Box width = left margin + right margin + left border + right border + left padding + right padding + content width.
Box height = top margin + bottom margin + top border + bottom border + top padding + bottom padding + content width.
Colors
The margin is always transparent. Content and padding use the background property of the generating element. The border color is
defined by the border properties of the generating element.
|