CSS Positioning Flashcards
What is the default value for the position property of HTML elements?
position: static;
How does setting position: relative on an element affect document flow?
It does not affect document flow
How does setting position: relative on an element affect where it appears on the page?
You can offset elements away from where they would normally
How does setting position: absolute on an element affect document flow?
It takes an element out of normal flow and no longer affects elements around it
How does setting position: absolute on an element affect where it appears on the page?
Elements that are set to absolute no longer affect other elements around it.
How do you constrain an absolutely positioned element to a containing block?
You contain with an element that is non static position
ex: an element that has its position changed position: relative;, position: absolute;, position: fixed;
What are the four box offset properties?
top left bottom right