CSS Layout Flashcards

1
Q

What are the four components of the box model?

A

Content, padding, borders, margin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between padding and border?

A

Padding creates space inside the box. Margin creates space outside the box.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly