---
title: "Discussion on \"THE PERFECT HACK TO CENTER a DIV?\nHere is how it's done...\" | Hashnode"
description: "Discussion on \"THE PERFECT HACK TO CENTER a DIV?\nHere is how it's done...\". A simple trick to place a div at the center of your place with a few lines of code. Easy to understand and apply in your code"
url: "https://hashnode.com/posts/the-perfect-hack-to-center-a-div-here-is-how-its-done/630899dc4d50fd71142c67cd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [THE PERFECT HACK TO CENTER a DIV? Here is how it's done...](https://rachelcodes.com/the-perfect-hack-to-center-a-div-here-is-how-its-done?utm_source=hashnode&utm_medium=feed)

A simple trick to place a div at the center of your place with a few lines of code. Easy to understand and apply in your code

Aug 26, 2022 · 1 min read · rachelcodes.com  
Read the article

-   [#html5](https://hashnode.com/tag/html5)
-   [#css](https://hashnode.com/tag/css)
-   [#flexbox](https://hashnode.com/tag/flexbox)
-   [#center-a-div](https://hashnode.com/tag/center-a-div)

## Written by

[Rachel Isaac](https://hashnode.com/@rachelwebdev)

@rachelwebdev · United Arab Emirates

  
[View profile](https://hashnode.com/@rachelwebdev)

Passionate Full stack developer with a focus on clean, accessible code and open-source software. Skilled in various technologies.

As a passionate Full stack web developer, I prioritize open-source software and strive to create clean, accessible code and designs that are easy for everyone to use. With experience working remotely and collaborating through pair programming, I am adept at quickly adapting and becoming proficient in various languages, frameworks, and technologies. My commitment to quality work and teamwork makes me a valuable asset to any development team.

## Responses 2

Markdown supported · ⌘↵ to post

[Peter Ademiju](https://hashnode.com/@KingCephas)

[Aug 30, 2022](https://hashnode.com/posts/the-perfect-hack-to-center-a-div-here-is-how-its-done/630899dc4d50fd71142c67cd/comment/630e609375af73ad1f05eb1d)

Cool. Keep up the energy 😉

[Nosen Mercy Ohunyon](https://hashnode.com/@Mom3dees)

[Aug 27, 2022](https://hashnode.com/posts/the-perfect-hack-to-center-a-div-here-is-how-its-done/630899dc4d50fd71142c67cd/comment/6309d3464d50fd71142c9428)

Nice one
