CSS - Layouts Flashcards

1
Q

Never use ______ for layouts.

A

Never use tables for layouts.

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

An element with a float value of _____ or _____ is taken out of the normal flow of a document and shifted to one side of the containing box. The content that follows it in the document wraps around the floated element’s new position.

A

An element with a float value of left or right is taken out of the normal flow of a document and shifted to one side of the containing box. The content that follows it in the document wraps around the floated element’s new position.

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

_____: An element is not floated and behaves as normal.

A

none: An element is not floated and behaves as normal.

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

______: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element.

A

left: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element.

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

______: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element. Think of a small photo that is moved to the right and has text flowing around it;

A

right: An element is taken out of the normal flow and is shifted to the left of where it was to otherwise appear, with content flowing around it on the right side of the element. Think of a small photo that is moved to the right and has text flowing around it;

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

You now have the basic idea of how an element behaves when floated.

A

You now have the basic idea of how an element behaves when floated.

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

Using _____ for layout was a common web design layout technique. However, there are many things that designers need to understand about floats.

A

Using floats for layout was a common web design layout technique. However, there are many things that designers need to understand about floats.

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

What method allows block elements to behave like inline elements (positioned next to each other) AND maintain its widths and heights?

A

.box {
display: inline-block;
}

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

______ gives designers a higher level of layout control over multiple children within a parent.

A

Flexbox gives designers a higher level of layout control over multiple children within a parent.

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

A flexbox implementation consists of a _____ container (flex container) and ______ elements (flex items).

A

A flexbox implementation consists of a parent container (flex container) and child elements (flex items).

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

Flexbox defines how those _______ elements are laid out and how they fit the space available to them.

A

Flexbox defines how those child elements are laid out and how they fit the space available to them.

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

What is the syntax for using flex?

A

.box {
display: flex;
}

<div class="box">
 <div>One</div>
 <div>Two</div> 
 <div>Three</div>
</div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Child elements may be assigned a ______ via the flex-direction property. This determines the “____ ____”. The other axis at 90 degrees to the main axis is called the “______-axis”.

Items may be arranged in a row (____ to _____ to _____) or a column (top to bottom/bottom to top).

A

Child elements may be assigned a direction via the flex-direction property. This determines the “main axis”. The other axis at 90 degrees to the main axis is called the “cross-axis”.

Items may be arranged in a row (left to right/right to left) or a column (top to bottom/bottom to top).

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

Therefore, if the following CSS: flex-direction: row;

is applied to the flex-container, the main axis would be _____ and the cross axis would be _______.

A

Therefore, if the following CSS: flex-direction: row;

is applied to the flex-container, the main axis would be horizontal and the cross axis would be vertical.

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

If additional layout control is needed, the “_______” property on individual flex-item elements can be used to specify the order of flex-items within the flex container.

A

If additional layout control is needed, the “order” property on individual flex-item elements can be used to specify the order of flex-items within the flex container.

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

The justify-content property then defines how the browser distributes __________ and ________ content items.

A

The justify-content property then defines how the browser distributes space between and around content items.

17
Q

The align-self property defines how a single flex item is ______ on the _______ _______ .

A

The align-self property defines how a single flex item is aligned on the cross axis.

18
Q

______-______/_____-_____ specifies how the items grow/shrink relative to the rest of the _____-items. These properties can be set ________ of each other.

A

flex-grow/flex-shrink specifies how the items grow/shrink relative to the rest of the flex-items. These properties can be set independently of each other.

19
Q

Similar to flexbox, the CSS Grid system consists of a _____ and child ______. The difference is that the Grid manages _____ AND _______.

A

Similar to flexbox, the CSS Grid system consists of a parent and child elements. The difference is that the Grid manages rows AND columns.

20
Q

_____-______-______ define how the columns are sized.

A

grid-template-columns define how the columns are sized.

21
Q

_____-______-______ define how the rows are sized.

A

grid-template-rows define how the rows are sized.

22
Q

_____-______-______ specifies the named grid areas which must be set in the child element’s grid-area property. A dot signifies a blank grid area.

A

grid-template-areas specifies the named grid areas which must be set in the child element’s grid-area property. A dot signifies a blank grid area.

23
Q

The new fr unit represents a fraction of the available space in the grid container.

A

The new fr unit represents a fraction of the available space in the grid container.

24
Q

Therefore, grid-template-columns: 1fr 1fr 1fr 1fr would create _______ columns whereas grid-template-columns: 1fr 1fr 1fr 100px would create ______ columns out of the remaining available space (total space - 100px)

A

Therefore, grid-template-columns: 1fr 1fr 1fr 1fr would create 4 equal columns whereas grid-template-columns: 1fr 1fr 1fr 100px would create 3 equal columns out of the remaining available space (total space - 100px)

25
Q
.container {
	display: grid;
	\_\_\_\_\_\_\_\_\_: 1fr 1fr 1fr 1fr; 
	\_\_\_\_\_\_\_\_\_\_: 100px 200px 100px; 
	\_\_\_\_\_\_\_\_\_\_: "head head2 .side" 
		"main main2 . side" 
		"footer footer footer footer";
A

.container {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 100px 200px 100px;
grid-template-areas: “head head2 .side”
“main main2 . side”
“footer footer footer footer”;

.one{
grid-area: head;
}

26
Q

grid-_____ and grid-r____ may be used to specify an item’s start ____ and _____ in the grid system.

A

grid-column and grid-row may be used to specify an item’s start position and span in the grid system.

27
Q

Horizontal and vertical gutters can be set using the column-_____ and row-_____ properties.

A

Horizontal and vertical gutters can be set using the column-gap and row-gap properties.