Skip to content

Positioned Layout

Relative Positioning • Josh W Comeau's Course Platform

Default is static

inset: shorthand for top, right, bottom, left

position: fixed;
inset: 0;
margin: auto;

Will center the element both horizontally and vertically

Absolute

  • ????top: 0 vs margin-top: auto;

margin > top


Last update: 2023-02-03