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?
The flow of the document moves an element in relation to where it would have been in normal flow
How does setting position: relative on an element affect where it appears on the page?
The position changes from where it would have been on the page if the element was in normal flow
How does setting position: absolute on an element affect document flow.
Doesn’t affect the flow and pretends the element isn’t there.
How does setting position: absolute on an element affect where it appears on the page?
The element moves in relation to its container element
How do you constrain an absolutely positioned element to a containing block?
Set the containing block to a position: relative
What are the four box offset properties?
Top, Bottom, Left, Right