---
title: "Discussion on \"How to center a 'div' in 5 different ways\" | Hashnode"
description: "Discussion on \"How to center a 'div' in 5 different ways\". Beginners struggle to center 'div' but it can be done in a variety of ways"
url: "https://hashnode.com/posts/how-to-center-a-div-in-5-different-ways/63aa87eb72fcbbe39e1c3b66"
---

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

Discussion

# [How to center a 'div' in 5 different ways](https://masroorkhan.hashnode.dev/how-to-center-a-div-in-5-different-ways?utm_source=hashnode&utm_medium=feed)

Beginners struggle to center 'div' but it can be done in a variety of ways

Dec 27, 2022 · 2 min read · masroorkhan.hashnode.dev  
Read the article

-   [#web-development](https://hashnode.com/tag/web-development)
-   [#css](https://hashnode.com/tag/css)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#beginner](https://hashnode.com/tag/beginner)

## Written by

[Masroor Khan](https://hashnode.com/@KhanMasroor)

@KhanMasroor · Pakistan

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

I'm a software and web developer and writer, on a journey to learn and teach.

I'm a Computer Science &amp; I.T. graduate. But kept the Computers my hobby, side hustle, or a way to relax. Programming stack: C/C++/C#, Visual Basic, Python, Java, SQL, R. Graphics: Corel Draw and Adobe Suite. Discovered the world of Web Development &amp; Design, learned Frontend (HTML, CSS, Javascript, and React) and now discovering Backend.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
