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 does not affect the document flow, the surrounding elements stay positioned where they would normally be in.

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 moves the element relatively from where it would be.

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 removes the elements from the document flow as it doesn’t exist.

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 attaches itself to the first non-static containing parent.

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

Using position: non-static in the containing block.

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