Ch5 Flashcards
To calculate the height of a box when using the box model, you add the height of the content area to the sum of the heights of the
top and bottom borders, top and bottom margins, and top and bottom padding
When you set a border for a block element, you can set the color, style, and __________________
width
If you want to use padding to control the spacing before and after h2 elements, you should start by setting the ____________________________ for those elements to zero.
margin
By default, if you specify a background image for a block element, it will be _____________________________ both horizontally and vertically so it fills the block element.
repeated
The code that follows
padding: .5em 0 .25em;
applies this padding to an element:
.5em above, 0 left and right, and .25em below
The code that follows
border-style: solid none;
means that the box should have
solid top and bottom borders
By default, the box for a block element is as wide as the _________________ that it’s in.
block
If you set the background color for the body of a page to blue and you don’t set the background color for a section within the body, the background of the section will be _________________
blue
If the bottom margin for one element is 1.5 em and the top margin for the element below it is 1 em, how large is the margin between the two elements when the page is rendered in a browser?
1.5em
In the code that follows
margin: 0 auto;
the auto keyword means
to center the element horizontally within the containing block