UI Components์ถœ์ฒ˜: CSS-Tricks์กฐํšŒ์ˆ˜ 2

Yet Another Way to Center an (Absolute) Element

By Juan Diego Rodrรญguez
2026๋…„ 2์›” 27์ผ
**Yet Another Way to Center an (Absolute) Element**

TL;DR: We can center absolute-positioned elements in three lines of CSS. And it works on all browsers. .element { position: absolute; place-self: center; inset: 0; } Why. Well, that needs a longer answer. In recent years, CSS has brought a lot of new features that don’t necessarily allow us to do new stuff, but certainly make them easier and simpler...

---

**[devsupporter ํ•ด์„ค]**

์ด ๊ธฐ์‚ฌ๋Š” CSS-Tricks์—์„œ ์ œ๊ณตํ•˜๋Š” ์ตœ์‹  ๊ฐœ๋ฐœ ๋™ํ–ฅ์ž…๋‹ˆ๋‹ค. ๊ด€๋ จ ๋„๊ตฌ๋‚˜ ๊ธฐ์ˆ ์— ๋Œ€ํ•ด ๋” ์•Œ์•„๋ณด์‹œ๋ ค๋ฉด ์›๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.