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

no effect on document flow; there is still the gap where the element would have been

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

Does not affect inherently where it appears on the page; visually moves an element in relation to where it would have been in normal flow, can overlap other elements

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

removed from document flow; may or may not have an effect on other elements; the gap where the element should be is gone and it sits on its own layer, separate from anything else

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

moves to top left to whichever parent is non-statically positioned (or the body if there are none)

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

They need to be within a non-static parent

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, right

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