positioning and floats Flashcards

1
Q

position: static;

A

normal flow of the document –> everything migrates to the upper left hand corner of the page

default –> don’t have to declare it

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

position: relative;

A

positions element relative to where it would fall in the normal flow of document by defining “offset values”:
distances from top, bottom, left, or right of that position

scrolls normally –> does not stay on page

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

position: absolute;

A

takes offset values (top, bottom, left, right) –> distance from the parent element IF parent also has position declared

child scrolls with parent element

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

position: fixed;

A

takes offset values –> based on distance from the viewport

DO NOT scroll aka stay on page

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

viewport

A

portion of website viewable to user

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

float

A

property used to position element to the left or right of their containing element

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

float: left;

A

element is placed to the left and lets other content wrap around it to the right

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

float: right;

A

element is placed to the right and lets other content wrap around it to the left

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

clear

A

property used after float to prevent elements following floated element from wrapping around floated element

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

clear: left;

A

no floating elements allowed on the left side of the cleared element

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

clear: right;

A

no floating element allowed on the right side of the cleared element

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

clear: both;

A

no floating element allowed on either side of the cleared element

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

offsets

A

used to position elements along with relative, fixed, absolute positions

top right bottom left

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