COMP 126 (Chapters 9-10)
Which of the following code snippets will center a flex item in the center of its container? a. .container { align-items: center; justify-content: center; } b. .container { justify-items: center; align-self: center; } c. .container { align-items: center; margin: 0 auto; } d. .container { flex-direction: center; flex-center: 100; }
.container { align-items: center; justify-content: center; }
You have a row of flex items that you set to run horizontally across the center line of a flex container. What CSS property can you use to place one of the items on the top of the container instead? a. flex-top b. align-self c. align-item d. flex-direction
align-self
You use the justify-content property to align the flex items in a container a. along the main axis b. along the cross axis c. along the main or cross axis, depending on the flex direction
along the main axis
Which CSS property do you use to display a block element as a flex container? a. display b. flex c. flexbox d. flex-direction
display
A flex container can contain one or more a. flex boxes b. flex items c. cross axes d. floats
flex items
Which CSS property do you use to determine whether flex items should be displayed horizontally or vertically? a. display b. flex c. flexbox d. flex-direction
flex-direction
By default, items in a flex container are displayed a. vertically from top to bottom b. vertically from bottom to top c. horizontally from left to right d. horizontally from right to left
horizontally from left to right
What is the main axis in terms of flexbox properties? a. the horizontal axis of the flex container b. the vertical axis of the flex container c. the axis running in whatever flex-direction you set d. the baseline axis established by the contents of the flex container
the axis running in whatever flex-direction you set
Flexbox allows you to lay out elements side by side... a. without using the box model b. without using floats c. without using CSS d. without using HTML
without using floats
Which of the following can you not do with flexbox properties and values alone (that is, with no other methods)? a. Set elements to flow horizontally or vertically across an area b. Make a horizontal row of buttons shift to vertical alignment when viewed on a small mobile browser c. Reverse the order of the images in a gallery d. Make a row of elements collapse together into a hamburger menu when viewed on a small mobile browser
Make a row of elements collapse together into a hamburger menu when viewed on a small mobile browser