CSS Flashcards
What is the default flex-direction of a flex container?
row
What is the default flex-wrap of a flex container?
no wrap
Why do two div elements “vertically stack” on one another by default?
Beacause they are block elements
What is the default flex-direction of an element with display: flex?
row
What is the default value for the position property of HTML elements?
Static
How does setting position: relative on an element affect document flow?
relative position moves an element to where it would normally flow
How does setting position: relative on an element affect where it appears on the page?
it would act as static, unless other positioning elements are included
How does setting position: absolute on an element affect document flow?
removes element from the flow
How does setting position: absolute on an element affect where it appears on the page?
It’s taken out of the pages, other elements are unaffected
How do you constrain an absolutely positioned element to a containing block?
By using the positioning schemes, (i.e top, right, left, bottom)