Chapter 5 Flashcards

1
Q

What is the box model?

A

It uses the CSS properties margin, border, and padding to arrange content on the page.

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

What is the differences between margins and border?

A

Margins = transparent, meaning we cannot add color or style to the margin property.

We can add color and style to the border.

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

What is the flexible box layout?

A

It is new in CSS3

Creates flexible elements in order to accommodate different screen sizes and display devices.

Uses parent-child concept.

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

What is the first step in creating a flexible layout?

A
  1. Create a flexible parent element.

2. All the child elements contained inside the parent element are flexible by default.

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

What is the display property value to flex?

A

display:flex;

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

What is the term for child elements inside a parent flex element?

A

Child flex items

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

What does the flex properties tell the browser?

A

The flex-grow, flex-shrink, and flex-basis properties tell the browser or user agent how elements should react when the display or screen size changes.

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

What is flex-grow?

A

The flex-grow property specifies how much the element will grow relative to the other flex items within the parent flex container. The amount of actual growth is determined by the available space in the parent element. Negative numbers cannot be used as a flex-grow value. The default flex-grow value is one, meaning each flex item is the same size.

If the value is set to zero = it will not grow.

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

What is flex-shrink?

A

The flex-shrink property specifies how much the element will shrink relative to the other flex items within the parent flex container. The default flex-shrink value is one.

If the value is set to zero= it will not shrink.

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

What is flex-basis?

A

The flex-basis property, the third value provided to the flex property, sets the initial width of the element before the other elements are distributed. If the flex-basis value is not set, it defaults to 0.

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

What is a flex-direction?

A

The flex-direction property is a parent flex box property that is used to change how the flex box container will display child items

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

What is flex-wrap:wrap used for?

A

Allows the contents to be displayed vertically whn the screen gets smalller.

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

Whats another way of writing:

#container {
display:flex;
flex-direction: row;
flex-wrap: wrap;
}
A

container {

display:flex;
flex-flow: row wrap;
}

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

What is a grid layout model?

A

It is still under development

Only IE 10 browser supports it and no other browsers.

W3C considers it as “Working draft”

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

Grid items?
Grid tracks?
Grid cell?
Grid lines?

A

Child elements are called grid items

grid tracks are the rows and columns in the grid.

grid lines are the horizontal and vertical lines between the

grid cell is the space used for the layout of the element like cells in an Excel spreadsheet.columns and rows,

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

What is included in the total width?

A

Total width = width + padding right + padding left + border right + border left + margin right + margin left

17
Q

What is included in the total height?

A

Total height = height + pad top + pad bottom + border top + border bottom + margin top + margin bottom

18
Q

How does the css look like in the flexParent and flexChild?

A
#flexParent {
display:flex;
}
. flexChild {
flex: 0 1 200px;
background: red;
margin: 2px; }