CSS Positioning Flashcards

1
Q

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

A

Static

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

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

A

It doesn’t affect the rest of the document flow.

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

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

A

Moves an element in relation to where it would have been in normal flow.

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

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

A

the element is taken out of normal flow and no longer affects the position of other elements on the page. (They act like it is not there.)

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

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

A

The element is placed relative to the nearest non-static ancestor. (It will go back to the first HTML element that is not static.)

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

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

A

Containing block has to be non-static.

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

What are the four box offset properties?

A

Top, bottom, left, and right

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