---
title: "Discussion on \"Center Text Vertically and Horizontally in CSS\" | Hashnode"
description: "Discussion on \"Center Text Vertically and Horizontally in CSS\". Hi Everyone 👋\nToday I wanted to share with you how to center text vertically and horizontally in CSS. We will look into three methods to achieve this using CSS Flexbox Layout (Flexible Box) and CSS Grid Layout. Also, in the end, I will show you the ..."
url: "https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff"
---

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

Discussion

# [Center Text Vertically and Horizontally in CSS](https://iampalash.hashnode.dev/center-text-vertically-and-horizontally-in-css?utm_source=hashnode&utm_medium=feed)

Hi Everyone 👋 Today I wanted to share with you how to center text vertically and horizontally in CSS. We will look into three methods to achieve this using CSS Flexbox Layout (Flexible Box) and CSS Grid Layout. Also, in the end, I will show you the ...

Mar 8, 2021 · 3 min read · iampalash.hashnode.dev  
Updated Jul 23, 2021  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#tips](https://hashnode.com/tag/tips)
-   [#html](https://hashnode.com/tag/html)
-   [#learning](https://hashnode.com/tag/learning)
-   [#100daysofcode](https://hashnode.com/tag/100daysofcode)

## Written by

[Palash Mondal](https://hashnode.com/@iampalash)

@iampalash · India

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

Programmer • Lifelong Learner • Positive Thinker

Hi everyone 👋 I am Palash, a passionate programmer &amp; front-end developer. I like to share HTML, CSS, JavaScript and web development tips &amp; tricks and try to explain them in a simple manner. Happy Coding!

## Responses 3

Markdown supported · ⌘↵ to post

[Himesh Prasad](https://hashnode.com/@HimeshPrasad)

[Jul 25, 2021](https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff/comment/60fd246118fbbb77c9467394)

Incredible. I like it. 👏

[Palash Mondal](https://hashnode.com/@iampalash)

[Jul 25, 2021](https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff/comment/60fd246118fbbb77c9467394#reply-60fd2aad31552277811ae98c)

Thank you! 😊

[Chirag Dev](https://hashnode.com/@ChiragCodes)

[Jul 23, 2021](https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff/comment/60fa558f62e20b58c1c91b67)

Well explained. Thanks for the examples also.

[Palash Mondal](https://hashnode.com/@iampalash)

[Jul 23, 2021](https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff/comment/60fa558f62e20b58c1c91b67#reply-60fa70b063fa996c3b5af48c)

Glad that you found it helpful! 😊

[Edidiong Asikpo (Didi)](https://hashnode.com/@didicodes)

[Mar 9, 2021](https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff/comment/604727a2ad7c5f4abc7cd0d1)

Amazing article as always [Palash Mondal](https://hashnode.com/@iampalash). Thanks for sharing.

[Palash Mondal](https://hashnode.com/@iampalash)

[Mar 9, 2021](https://hashnode.com/posts/center-text-vertically-and-horizontally-in-css/6045ce9a8458d42fc821cbff/comment/604727a2ad7c5f4abc7cd0d1#reply-604731d8ad7c5f4abc7cd1ec)

Thank you for your kind words [Edidiong Asikpo](https://hashnode.com/@didicodes). Glad you liked it! 😊
