Positioning Flashcards

1
Q

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

A

position: static

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

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

A

it doesn’t affect document flow; the element would still be visible

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

It appears normally, and when box offsets are adjusted it is positioned away from its normal position (relative to itself)

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

It visually changes positions, but it is not visible in the document flow, therefore the page will treat it as if it’s not there and adjusts other elements accordingly.

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

It’s positioned relative to its closest positioned ancestor

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

You would have to set its parent (or closest ancestor) to a non-static position (relative, fixed, absolute).

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

right, left, bottom, top

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