CSS Utilites Flashcards

1
Q

How to fill a box with an image without distorting it

A

.box img {
width: 100%;
height: 100%;
}

<div class="box box1"><img></div>\
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to center an item

A
.wrapper {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

<div>
<div>center me!</div>
</div>

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

Basic concepts of flexbox

A

row
row-reverse
column
column-reverse

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

Start and end lines

A

In the past, CSS was heavily weighted towards horizontal and left-to-right writing modes
Modern layout methods encompass the range of writing modes

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

flex-direction

A

Items display in a row

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

main dimension

A

The items do not stretch on the main dimension, but can shrink

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

flex-basis

A

property is set to auto

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

flex-wrap

A

property is set to nowrap.

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

flex-basis

A

is what defines the size of that item in terms of the space it leaves as available space

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

flex-grow

A

If we gave all of our items in the example above a flex-grow value of 1 then the available space in the flex container would be equally shared

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

flex-shrink

A

do not have enough space in the container to lay out our items, and flex-shrink is set to a positive integer, then the item can become smaller than the flex-basis

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