UI Components์ถ์ฒ: CSS-Tricks์กฐํ์ 1
Yet Another Way to Center an (Absolute) Element
By Juan Diego Rodrรญguez2026๋
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์์ ์ ๊ณตํ๋ ์ต์ ๊ฐ๋ฐ ๋ํฅ์ ๋๋ค. ๊ด๋ จ ๋๊ตฌ๋ ๊ธฐ์ ์ ๋ํด ๋ ์์๋ณด์๋ ค๋ฉด ์๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.
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์์ ์ ๊ณตํ๋ ์ต์ ๊ฐ๋ฐ ๋ํฅ์ ๋๋ค. ๊ด๋ จ ๋๊ตฌ๋ ๊ธฐ์ ์ ๋ํด ๋ ์์๋ณด์๋ ค๋ฉด ์๋ณธ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ์ธ์.
