Prelims - CSS box model Flashcards
1
Q
is essentially a box that wraps around every HTML element
A
CSS box model
2
Q
Different parts of the box model
A
Content
Padding
Border
Margin
3
Q
The content of the box, where text and images appear
A
Content
4
Q
Clears an area around the content. Is transparent
A
Padding
5
Q
A border that goes around the padding and content
A
Border
6
Q
Clears an area outside the border. Is transparent
A
Margin
7
Q
how to calculate the total width and height of an element?
A
total width
width of content area + (left padding + right padding) + (left border + right border)
total height
height of content are + (top padding + bottom padding) + (top border + bottom border)