# Make center text center aligned

**URL:** <https://community.hubspot.com/t/make-center-text-center-aligned/64646>\
**Category:** CMS Development\
**Created:** [September 7, 2022, 9:14pm UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646 "2022-09-07T21:14:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NisantaSahoo](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NisantaSahoo](https://community.hubspot.com/u/NisantaSahoo)\
**Post date:** [September 7, 2022, 9:14pm UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646/1 "2022-09-07T21:14:08Z")

</div>

Hello,

I believe this code is making my text column-wise and I am unable to make it center aligned  
\<div class=“grid\_\_col grid\_\_col–1of2”\>.

Can someone help with what code I should use the make the text center aligned?

PS. I have limited coding skills 🙂

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [September 8, 2022, 5:37am UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646/2 "2022-09-08T05:37:52Z")

</div>

Hi @NisantaSahoo,

if you want to center the text in the column. You can:

1. **add inline-styling**

like this

`<div class="grid __col grid__ col--1of2" style="text-align:center">`

to it. It will work, but I don’t recommend inline-styling

1. **create a simple [CSS class](https://knowledge.hubspot.com/design-manager/create-edit-and-attach-css-files-to-style-your-site)**

like this

module/template(or where ever this div is)

`<div class="grid __col grid__ col--1of2 text-centered">`

Your main CSS file:

```lia-code-sample
.text-centered{
text-align:center;
}

```

This will give you more control over media queries(responsiveness).

best,

Anton

_Moderator note: While this solution may not address the original poster’s specific situation, it could be helpful for other community members facing similar challenges._

---

<div class="post-metadata">

**Author:** ![NisantaSahoo](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NisantaSahoo](https://community.hubspot.com/u/NisantaSahoo)\
**Post date:** [September 8, 2022, 6:02am UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646/3 "2022-09-08T06:02:30Z")

</div>

Hi Anton,

Thanks a lot for the response, but I do not want the text to be centered inside the column. That’s not my purpose, I want it to be center aligned on the page. Please take a look at the design layout

 ![scrnli_9_8_2022_11-31-10 AM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/9/9916ab405afb0ff60506c60880ef84222ee472d8.png)

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [September 8, 2022, 7:50am UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646/4 "2022-09-08T07:50:58Z")

</div>

Hi @NisantaSahoo,

could you please post a preview link to the page (not template)?

Thank you

Anton

---

<div class="post-metadata">

**Author:** ![NisantaSahoo](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NisantaSahoo](https://community.hubspot.com/u/NisantaSahoo)\
**Post date:** [September 8, 2022, 8:49am UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646/5 "2022-09-08T08:49:23Z")

</div>

I didn’t get you, the page is not published yet

---

<div class="post-metadata">

**Author:** ![JanetArmstrong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janetarmstrong/32/99730_2.png) [@JanetArmstrong](https://community.hubspot.com/u/JanetArmstrong)\
**Post date:** [September 8, 2022, 2:28pm UTC](https://community.hubspot.com/t/make-center-text-center-aligned/64646/6 "2022-09-08T14:28:08Z")

</div>

There are horizontal spacer modules you can put to the left and right to reduce the width and center your content. Or you can use css and give it a maximum width and center it with auto margin, but sounds like you want to avoid code.
