css-positioning Flashcards
What is the default value for the position property of HTML elements?
Static flow
How does setting position: relative on an element affect document flow?
This does not affect the position of surrounding elements; they stay in the position they would be in in normal flow.
How does setting position: relative on an element affect where it appears on the page?
It does not change anything until you add offset properties.
How does setting position: absolute on an element affect document flow?
Removes element that are static.
How does setting position: absolute on an element affect where it appears on the page?
It will look for its closest positioned ancestor
How do you constrain an absolutely positioned element to a containing block?
Containing block should have a non-static positioning
What are the four box offset properties?
top or bottom and left or right