CSS BOX MODEL
All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout. The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content.
The box model allows us to place a border around elements and space elements in relation to other elements.
.margin
{
width:100px;
}
.border
{
color:yellow;
}
.padding
{
width:100px;
}
.content
{
background: blue;
color:yellow;
}
Bibliography
- W3schools, Date Accessed: 18/12/12- http://www.w3schools.com/css/css_boxmodel.asp
- CSS tricks, Date Accesssed: 18/12/12- http://css-tricks.com/the-css-box-model/
No comments:
Post a Comment