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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgprnPbgFynoCaYDcjOMcg6IxqKrZkoHc6n7ZDGSBrl26kYNK2y1JWWa4K4f61Bgn0n07B7A3dtLAV7KbbeSc5R0LFQgP545JNsSOSqwQ9k8Ct9o8xFWVRWs3L2VjEhKHNr9MajpiI4e7w/s640/BOXMODEL.jpg)
.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