Absolute positioning

noun

say it: “AB-suh-loot puh-ZISH-uh-ning” /ˈæbsəluːt pəˈzɪʃənɪŋ/

CSS positioning that takes an element out of the flow and places it relative to its nearest positioned parent.

What is position: absolute?

Absolute positioning takes an element out of the normal flow and places it relative to the nearest positioned ancestor.

.product-card { position: relative; }
.sale-badge { position: absolute; top: 10px; left: 10px; }

In a sentence

  • “The Sale badge uses absolute positioning at top: 0; right: 0; of its card.”

Level: Apprentice · More CSS terms at this level

Updated