# How to center elements in CSS without adding a wrapper in HTML

> Clean Markdown view of GeekNews topic #12786. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=12786](https://news.hada.io/topic?id=12786)
- GeekNews Markdown: [https://news.hada.io/topic/12786.md](https://news.hada.io/topic/12786.md)
- Type: news
- Author: [seyedi](https://news.hada.io/@seyedi)
- Published: 2024-01-10T14:16:18+09:00
- Updated: 2024-01-10T14:16:18+09:00
- Original source: [bejamas.io](https://bejamas.io/blog/centering-elements-without-wrapper-in-css/)
- Points: 4
- Comments: 2

## Topic Body

Ever wondered how to center elements in CSS without the hassle of extra wrappers? Two lines of CSS are all you need! Explore use cases, learn when to apply these techniques, and get familiar with auto box sizes.

## Comments



### Comment 22145

- Author: dodok8
- Created: 2024-01-10T16:56:00+09:00
- Points: 2

어느순간 CCS로 중심 맞추기가 밈이 된것 같아요

### Comment 22146

- Author: dodok8
- Created: 2024-01-10T16:56:07+09:00
- Points: 1
- Parent comment: 22145
- Depth: 1

그만큼 자주 쓰이긴 하는데
