CSS Flashcards

1
Q

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

A

selector,
declaration,
BLOCK
property,
value
universal

css rule set
css selector
curly braze

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

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

A

.class p class=””

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

In CSS, how do you select elements by their tag name?

A

p

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

In CSS, how do you select an element by its id attribute?

A

apple, div id=””

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

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

A

HEX codes
RGB
Color Names

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

What CSS properties make up the box model?

A

margin, padding border, content area

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
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
9
Q

box sizing border box

A

without border box, when you add padding etc to something, it may change the size of something
otherwise it gives you a tiny bit of padding within the content

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

What is a Pseudo Class?

A

A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s)

-phantom class in a specific state they are rather than regular style selectors

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

What are CSS pseudo-classes useful for?

A

1 they help the navigator or show things that are being changed on the page

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

direct child selector

A

table > tr this means all table rows

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

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

A

row

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

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

A

no-wrap

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

flex only controls the direct children, so you have to always add display flex

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

Why do two div elements “vertically stack” on one another by default?

A
17
Q

What is the default flex-direction of an element with display: flex?

A
18
Q

Why do two div elements “vertically stack” on one another by default?

A

Because DIVs are technically block elements

19
Q

What is the default flex-direction of an element with display: flex?

A

row

20
Q

What is the default value for the position property of HTML elements?

A

sticky

21
Q

How does setting position: relative on an element affect document flow? effect elements around it?

A

you can shift TRBL and it does not affect document flow
does not have any direct affect on document flow

there is no change on document flow - only moves something visually not laterally

22
Q

How does setting position: relative to an element affect where it appears on the page?

A

CHanges its appearance but now the order of document flow
doesn’t affect inherently where it appears on the page

23
Q

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

A

It is taken out of normal flow, and does not disrupt other elements as they ignore it

24
Q

How does setting position: absolute on an element affect where it appears on the page?

A

It is not in normal flow, everything else is, sits on top, goes to wherever nearest relative is,

25
Q

How do you constrain an absolutely positioned element to a containing block?

A

by setting its containing element to position relative

26
Q

What are the four box offset properties?

A

top, right bottom left

27
Q

what css rule set properties shorthand is transition
/

A

transition-property , transition-duration , transition-timing-function , and transition-delay .

28
Q

If you introduce CSS rules for a smaller min-width after the styles for a larger min-width in your style sheet, the CSS rules for the smaller min-width will “win”. Why is that?

A

Min width and max

Source order is given to the lower css rule set inheritance