The Box Model
Premium Content - Free Preview
An HTML element can take up more space on a page than its content itself. An element is surrounded by 3 other parts:
- The padding around the element
- The border around the padding
- The margin outside the border, to separate from other elements.
For example, here's a paragraph with a padding, border and margin:
The quick brown fox packed my box with five dozen liquor jugs and then jumped over the lazy dogs.
Here's each part marked:
The element itself is in the middle, surrounded by padding in the same color, then a border, and finally a (white) margin on the outside.
End of Free Content Preview. Please Sign in or Sign up to buy premium content.
CherSep 11, 3:53 AM
What problem with my code?
LearnerooSep 11, 9:54 AM
Did you select the image?
CherSep 11, 10:42 AM
Yes sir, here is my code:
/* CSS */
border: solid 2px gray;
LearnerooSep 11, 11:41 AM
OK but I see that your code passed, so there shouldn't be a problem.