Quiz 2
By default, the box for a block element is as wide as the ___ that it's in.
block
When you set the position property for a block element to absolute, the browser ___. - doesn't allow the element to overlap other elements on the web page - takes the element out of the flow of elements on the web page - keeps the element in the flow of elements on the web page - positions the element relative to the browser window
takes the element out of the flow of elements on the web page
The code that follows padding: .5em 0 .25em; applies this padding to an element: - .5em above, 0 left and right, and .25em below - .5em above, 0 right, and .25em below - .5em above, 0 left, and .25em below - .5em above and below, 0 right, and .25em left
.5em above, 0 left and right, and .25em below
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.5 em
Which of the following techniques can you NOT use to create a two-column layout? - Code the columns in any order and then float the first column to the left and the second column to the right. - Code the first column before the second column and then float both columns to the left. - Code the first column before the second column and then float the first column to the left. - Code the columns in any order and then float both columns to the left.
Code the columns in any order and then float both columns to the left.
Which of the following should you NOT do when using CSS3 properties to create text columns? - Include the property prefixes required to display the columns in browsers that support this feature. - Code the columns in an article element. - Make the columns wide enough to read easily. - Justify the text in the columns.
Justify the text in the columns.
When you use ___ positioning with CSS, the other elements on the page are positioned as if the element wasn't there.
absolute
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
To stop an element from flowing into the space on the side of a floated element, you can code the ___ property.
clear
For a three-column layout, you can ___. - code the main content and asides in any sequence and then float the first aside and the main content to the left and the second aside to the right - float the main content in the center and let the asides flow around it - code the main content and asides in sequence from left to right and then float the first aside to the left and the second aside to the right - code the main content and asides in any sequence and then float them all to the left
code the main content and asides in any sequence and then float the first aside and the main content to the left and the second aside to the right
By default, the box for a block element is as tall as the ___ requires.
content
When you use ___ positioning with CSS, the positioned element doesn't move in the browser window, even when you scroll.
fixed
If you want to use a ___ page layout, you set the width of the page to a percent.
fluid
When you set the position property for a block element to fixed, the element ___. - is positioned relative to the browser window - can't overlap other elements on the web page - always appears in the top left corner of the browser window - moves when you scroll in the browser window
is positioned relative to the browser window
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
In the box model, the border comes between the margin and the ___ for box.
padding
Which of the following formatting can you NOT apply to boxes using CSS3? - rounded corners - shadows - radial gradients - linear gradients
radial gradients
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
For a two-column layout where the main content is fluid and the aside is fixed, you use CSS to - set the body width to a percent and don't set the section width - set the body width to fixed width and don't set a section width - set the body with to a fixed width and set the section width to a percent - set both the body and section widths to percents
set the body width to a percent and don't set the section width
You use a reset selector to ___. - set the background color for all elements to white - set the margins and padding for all elements to zero - set inherited properties to their default values - set the font sizes for all text elements to their defaults
set the margins and padding for all elements to zero
The code that follows border-style: solid none; means that the box should have ___. - solid top and bottom borders - solid borders on all four sides and no background image - a solid top border - solid borders on all four sides
solid top and bottom borders
In the code that follows margin: 0 auto; the auto keyword means ___. - to center the element vertically within the containing block - to automatically align the element based on the size of the browser window - to center the element horizontally within the containing block - to automatically adjust the margins for the element whenever necessary
to center the element horizontally within the containing block
When you set the float property for a block element to left, the elements that follow it will flow into the space ___. - to the left of the floated element - to the right of the floated element if there's enough space - to the right of the floated element - to the left of the floated element if there's enough space
to the right of the floated element if there's enough space
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 margin, and bottom margin - top and bottom borders, top padding, and bottom padding - top and bottom borders, top and bottom margins, and top and bottom padding - top and bottom margins and top and bottom padding
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
When you use CSS to set the float property for an element, you should also set the ___ of the element.
width