Relative positioning
noun
say it: “REL-uh-tiv puh-ZISH-uh-ning” /ˈrɛlətɪv pəˈzɪʃənɪŋ/
CSS positioning that nudges an element from its normal place, and lets absolutely positioned children place themselves inside it.
What is position: relative?
Relative positioning nudges an element from where it would normally be, without moving anything else. It also makes the element the reference point for absolutely positioned children.
.product-card { position: relative; } /* the badge inside is placed relative to this */
In a sentence
- “I gave the card relative positioning so the badge inside it could sit in its corner.”
Level: Apprentice · More CSS terms at this level
Updated