# CTA button alignment horizontally in the center

**URL:** <https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904>\
**Category:** CMS Development\
**Created:** [November 13, 2018, 8:17am UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904 "2018-11-13T08:17:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaykoo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shaykoo/32/99730_2.png) [@Shaykoo](https://community.hubspot.com/u/Shaykoo)\
**Post date:** [November 13, 2018, 8:17am UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/1 "2018-11-13T08:17:31Z")

</div>

Hi, I am facing issues in putting two CTA align horizontally in the center. I am attaching images.

 ![Screenshot 2018-11-13 at 1.39.44 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/4/4b314010aa9906ac3b43d60684cff050ae5ba8de.png)  
This is what I need to display  
 ![Screenshot 2018-11-13 at 1.40.27 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/3/53af29139ec0f603f21412bb958c290667ebd50d.png)  
And this is what I have done but it’s not displaying the desired results

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [November 13, 2018, 1:22pm UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/2 "2018-11-13T13:22:53Z")

</div>

Hey @Shaykoo,

Could you get us an image of what the results are? And maybe a live demo?

---

<div class="post-metadata">

**Author:** ![Shaykoo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shaykoo/32/99730_2.png) [@Shaykoo](https://community.hubspot.com/u/Shaykoo)\
**Post date:** [November 13, 2018, 2:49pm UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/3 "2018-11-13T14:49:29Z")

</div>

This is the result @Kevin-C

 ![Screenshot 2018-11-13 at 8.17.18 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/d/d144e152c069451cda8a348a9f0215b94da9eb2c.png)  
the pink button is going too left “Get a demo” button is aligned right

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [November 13, 2018, 3:12pm UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/4 "2018-11-13T15:12:25Z")

</div>

@Shaykoo, do you have link to this page?

---

<div class="post-metadata">

**Author:** ![Shaykoo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shaykoo/32/99730_2.png) [@Shaykoo](https://community.hubspot.com/u/Shaykoo)\
**Post date:** [November 13, 2018, 3:34pm UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/5 "2018-11-13T15:34:58Z")

</div>

[https://preview.hs-sites.com/\_hcms/preview/template/multi?is\_buffered\_template\_layout=true&portalId=3906991&tc\_deviceCategory=undefined&template\_layout\_id=6492284154&updated=1542108305575](https://preview.hs-sites.com/_hcms/preview/template/multi?is_buffered_template_layout=true&portalId=3906991&tc_deviceCategory=undefined&template_layout_id=6492284154&updated=1542108305575)

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [November 13, 2018, 6:26pm UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/6 "2018-11-13T18:26:29Z")

</div>

@Shaykoo,

```auto
#hs_cos_wrapper_module_1542063417088224_ {
 text-align: right;
}

```

that is for above 767px

i would add a media query

```auto
@media (max-width: 767px){
 #hs_cos_wrapper_module_1542063421717226_, #hs_cos_wrapper_module_1542063421717226_ {
 text-align: center;
 }
 #hs_cos_wrapper_module_1542063421717226_{
 margin-top: 10px;}
}

```

just a heads up, you have some overflowing elements that you will want to address as well

good luck out there,

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [November 13, 2018, 3:39pm UTC](https://community.hubspot.com/t/cta-button-alignment-horizontally-in-the-center/10904/7 "2018-11-13T15:39:21Z")

</div>

Withou a live demo this is tough to diagnose.

Try this:

In the drag and drop editor, select the CTA on the left.  
Then in the Styling Editor (right panel) find the “inline styling” input and paste this css: **float: right;**

This will tell that element to floar to the right of its congainer. Now ensure you’re testing on a mobile device as well as a desktop as this solution may not have the desired outcome across the two.
