HTML and CSS Reference
In-Depth Information
The height and width properties applied to the element dictate the content size, while the
combination of padding, border and margin around this dictate the overall size of the box
on screen.
As can be seen, the background color fills the content and padding portions of the box. The
border will typically have its own color, while the margin will inherit the background color
of the element's parent.
All of these aspects of the box model can be controlled by CSS. For instance, consider the
following set of properties:
.element {
border: 1px solid #AAA;
padding: 10 0 10 0px;
margin-right: 15px;
width: 200px;
height: 100px;
Search WWH ::

Custom Search