Put this ASCII art at the top of your CSS file as a reminder of exactly what is meant by padding, border, margin, width, and height.
/* CSS refresher (or primer)
..............................................
: (1)Margin :
: ---------(2)Border------------------ :
:(1) | (3)Padding | (1):
: | This is the Content | :
: (2) of the element "box" (2) :
: | that represents each | :
: | (3) html element. (3) | :
: | (3) | :
: ------------(2)--------------------- :
: (1) :
:.............................................
|<-Element width-->|
|<------IE 5 Element width---------->| <<===Aren't you glad we are past those days now?
<----------Parent element 'width'---------->
1. Margin, 2. Border, 3. Padding
*/
No comments:
Post a Comment