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
How does setting position: relative on an element affect where it appears on the page?
Relative to its original position
How does setting position: absolute on an element affect document flow?
Removes it from the document flow.
How does setting position: absolute on an element affect where it appears on the page?
Attaches it to the next parent element set to :not(static)
How do you constrain an absolutely positioned element to a containing block?
By setting the containing block’s position to non-static
What are the four box offset properties?
Top, left, bottom, and right.