---
title: "Discussion on \"Two Ways To Center A Div\" | Hashnode"
description: "Discussion on \"Two Ways To Center A Div\". Centering a div on a webpage can be a tricky task, but with the latest CSS techniques, it has become much easier. In this article, we will discuss two simple ways to center a div.\nThe first method is to use the “display: grid, place-items: center” pr..."
url: "https://hashnode.com/posts/two-ways-to-center-a-div-7cfe13233835/65084420e255c509bc315491"
---

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

Discussion

# [Two Ways To Center A Div](https://lesleymashaya.hashnode.dev/two-ways-to-center-a-div-7cfe13233835?utm_source=hashnode&utm_medium=feed)

Centering a div on a webpage can be a tricky task, but with the latest CSS techniques, it has become much easier. In this article, we will discuss two simple ways to center a div. The first method is to use the “display: grid, place-items: center” pr...

Jan 16, 2023 · 2 min read · lesleymashaya.hashnode.dev  
Read the article

## Written by

[Lesley Mashaya](https://hashnode.com/@LesleyMashaya)

@LesleyMashaya

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

Frontend Developer hoping to share my experiences

Frontend developer | Technical Writer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
