0
0
CSSmarkup~5 mins

Position absolute in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does position: absolute; do in CSS?

It removes the element from the normal page flow and positions it relative to the nearest positioned ancestor (an ancestor with position set to relative, absolute, or fixed). If none exists, it positions relative to the page (viewport).

Click to reveal answer
beginner
Which CSS properties control the position of an element with position: absolute;?

The properties top, right, bottom, and left control where the element is placed.

Click to reveal answer
beginner
How does position: absolute; affect the space the element takes on the page?

The element does not take up space in the normal flow, so other elements behave as if it is not there.

Click to reveal answer
intermediate
What happens if no ancestor has a position other than static when using position: absolute;?

The element is positioned relative to the initial containing block, usually the browser window (viewport).

Click to reveal answer
intermediate
Why might you use position: relative; on a parent element when using position: absolute; on a child?

Setting position: relative; on the parent creates a positioning context so the absolutely positioned child is placed relative to that parent, not the whole page.

Click to reveal answer
What does position: absolute; do to an element?
AMakes it invisible
BKeeps it in normal flow but changes its color
CFixes it to the bottom of the page always
DRemoves it from normal flow and positions it relative to nearest positioned ancestor
If no parent has position set, where does an absolutely positioned element get placed?
ARelative to the browser window (viewport)
BRelative to the first child element
CRelative to the document title
DIt stays in the normal flow
Which CSS properties do you use to move an absolutely positioned element?
Afont-size, color
Bmargin, padding
Ctop, right, bottom, left
Ddisplay, visibility
What happens to other elements when an element is position: absolute;?
AThey behave as if the absolute element is not there
BThey move to make space for it
CThey become invisible
DThey get pushed down automatically
Why add position: relative; to a parent when using position: absolute; on a child?
ATo change the child's color
BTo make the child position relative to that parent
CTo hide the child element
DTo make the parent disappear
Explain how position: absolute; works and how it affects layout.
Think about how the element moves and how others behave around it.
You got /4 concepts.
    Describe why you might use position: relative; on a parent element when you have a child with position: absolute;.
    Consider how the child decides where to place itself.
    You got /3 concepts.