CSS Flashcards

1
Q

Name three different types of values you can use to specify colors in CSS.

A

rgb values, hex Codes, Color names

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

What is the default flex-direction of a flex container?

A

Items display in a row (the flex-direction property’s default is row ).
row (default): left to right in ltr; right to left in rtl
row-reverse: right to left in ltr; left to right in rtl
column: same as row but top to bottom
column-reverse: same as row-reverse but bottom to top

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

What is the default flex-wrap of a flex container?

A

nowrap
By default, flex items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.
.container {
flex-wrap: nowrap | wrap | wrap-reverse;
}

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

What are the names of the individual pieces of a CSS rule?

A

A CSS rule: selector/selector group {declaration block with declaration/s - property/shorthand property (value value) and value,/with fallback value (font-family)

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

In CSS, how do you select elements by their class attribute?

A

. dot nation

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

In CSS, how do you select elements by their type?

A

With element Selector (id #, .classname)

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

What CSS properties make up the box model?

A

margins, borders, padding, and the actual content.

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

Which CSS property pushes boxes away from each other?

A

Margin

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

Which CSS property add space between a box’s content and its border?

A

Padding

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

How does setting position: relative on an element affect document flow?

A

This does not affect the position of surrounding elements; they stay in the position they would be in in normal flow.

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

How does setting position: absolute on an element affect document flow?

A

This positions the element in relation to its containing element. It is taken out of normal flow, meaning that it does not affect the position
of any surrounding elements

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

Positioning

A

Positioning allows you to take elements out of normal document flow and make them behave differently, for example, by sitting on top of one another or by always remaining in the same place inside the browser viewport.

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

What are the four components of “the Cascade”.

A

Source order.
Inheritance.
Specificity.
Importance.

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

List the three selector types in order of increasing specificity.

A

type selector, class selector and id

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

What does the transform property do?

A

The transform CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model.

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

The transition property is shorthand for which four CSS properties?

A

The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay.

17
Q

Give two examples of media features that you can query in an @media rule.

A

max-width and min-width