CSS-positioning-Q&A Flashcards
What is the default value for the position property of HTML elements?
The default position is static for any html element if not specified explicitly.
How does setting position: relative on an element affect document flow?
Relative positioning moves an element in relation to where it would have been in normal flow. For example, you can move it 10 pixels lower than it would have been in normal flow or 20% to the right.
How does setting position: relative on an element affect where it appears on the page?
It will have no effect on it’s positioning at all
How does setting position: absolute on an element affect document flow?
An absolutely positioned element no longer exists in the normal document flow.
How does setting position: absolute on an element affect where it appears on the page?
It sits on its own layer separate from everything else.
It will align itself with the first non-static positioned parent.
How do you constrain an absolutely positioned element to a containing block?
You would set position relative to the parent element
What are the four box offset properties?
top, left, bottom and right.