CSS Positioning — Relative vs Absolute

Mikel Bishop
Dec 3, 2021

As I continue my journey into CSS, I am continuing to find creating cheatsheets and comparison charts to be helpful.

Positioning seemed to be pretty straightforward at first, but I dove down the rabbit hole a bit one day and decided to create a comparison chart for Relative and Absolute positioning.

My notes on the differences between Relative and Absolute positioning:

An example from W3Schools:

source: https://www.w3schools.com/css/css_positioning.asp

--

--