Box Model Flashcards
1
Q
From outside to inside, what is the order of the css properties that affect a box’s dimensions
A
- margin
- border
- padding
- content (i.e. width / height)
2
Q
How far do background-images and background-colors extend in the box model?
A
The image and colors will extend through the content to the border unless this default behavior is adjusted with the background-clip property
3
Q
Does each box have its own margin?
A
No, margins can be “shared” when adjacent to another box. This is called margin collapsing.
4
Q
How do an adjacent top and bottom margin “collapse?”
A
Top and bottom margins will be collapse using the following calculations:
- The largest individual margin size will be used
- If the margins are equal, only one margin will be used