WeCodeAcademy

Positioning

position controls where an element sits. relative keeps it in the flow; absolute places it relative to the nearest positioned parent.

Examplehtml
Open in editor »

top, right, bottom and left move a positioned element. position: fixed pins it to the window; sticky sticks it while scrolling.

Quick check

Which value positions an element relative to its positioned parent?

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.