08 - 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 does not affect flow.
How does setting position: relative on an element affect where it appears on the page?
Use top or bottom and left or right to indicate how far to move the element from where it would have been in normal flow.
How does setting position: absolute on an element affect document flow?
The box is taken out of normal flow and no longer affects the position of other elements on the page.
How does setting position: absolute on an element affect where it appears on the page?
Top left.
The box offset properties (top or bottom and left or right) specify where the element should appear in relation to its containing element.
How do you constrain an absolutely positioned element to a containing block?
Any other besides static. Position: fixed
What are the four box offset properties?
Top, Bottom, Left and Right