Aloysious' Codefellows Reading Notes
<== Previous Lesson Next Lesson ==>
<== Home 🏠
[show every box with this code]
* {
border: 1px solid red !important;
}
div {
width: 320px;
padding: 10px;
border: 5px solid gray;
margin: 0;
}
320px (width)
20px (left + right padding)
10px (left + right border)
0px (left + right margin)
= 350px
The total width of an element should be calculated like this:
Total element width = width + left padding + right padding + left border + right border + left margin + right margin
The total height of an element should be calculated like this:
Total element height = height + top padding + bottom padding + top border + bottom border + top margin + bottom margin
Property | Description |
---|---|
constructor | Returns the function that created the Array object’s prototype |
length | Sets or returns the number of elements in an array |
prototype | Allows you to add properties and methods to an Array object |
Values in an array are accessed if they are in a numbered list. It is important to know that the numbering of this list starts a\t zero (not one).
From the Duckett HTML book:
From the Duckett JS book:
<== Previous Lesson Next Lesson ==>
<== Home 🏠