CSS Positioning Flashcards
Any element that comes in as a block will automatically take up what size?
The full width of the page
What does inline-block value do?
Allows you to put several block elements on the same line.
What is the margin?
The space around the element
What happens when an element is set to position:absolute
It’s positioned in relation to the first parent element it has that DOESNT have position:static
What does the inline value do?
The inline value places all your elements next to one another, but not as blocks: they don’t keep their dimensions.
What is the border?
The edge of the element
What happens if there’s no such element with position:absolute
It’s positioned relative to
What is the inline display value best suited for?
HTML elements that are blocks by default, such as headers and paragraphs.
What is the padding?
The spacing between the border and the innermost layer: the actual conent
What does relative positioning do?
It tells the element to move relative to where it would have landed if it just had the default static positioning
What does the none display value do?
this prevents the page from displaying the selected element. As you might not expect, this removes the selected element from the page entirely, including any children and any content.
What is the content
The stuff in the box
What does fixed positioning do?
“glues an element to the screen”
Test Question
Test Answer
How do you set an element’s margin all at once
Start from the top margin and go around clockwise (going from top to right to bottom to left).