CSS Layout Flashcards
1
Q
What are the four components of the box model?
A
Content, padding, borders, margin
2
Q
What does padding do in the box model?
A
It offers breathing room to the content area by separating the content from the surrounding border area.
3
Q
What is the difference between padding and border?
A
Padding creates space inside the box. Margin creates space outside the box.
4
Q
What does the value “auto” do for margins?
A
When the browser sees the value “auto” for a margin declaration, then the browser will automatically calculate the margins for each side (to center it.).