Css positioning Flashcards
What is the default value for the position property of HTML elements?
static
How does setting position: relative on an element affect document flow?
it doesn’t effect the flow
How does setting position: relative on an element affect where it appears on the page?
This moves an element from the position it would be in normal flow, shifting it to the top, right, bottom, or left of where it would have been placed.
How does setting position: absolute on an element affect document flow?
It is taken out of
normal flow, meaning that it
does not affect the position
of any surrounding elements
How does setting position: absolute on an element affect where it appears on the page?
Absolutely positioned elements
move as users scroll up and
down the page.
How do you constrain an absolutely positioned element to a containing block?
relative, absolute,fixed
What are the four box offset properties?
top, left, bottom and right