# Custom CTA won't save

**URL:** <https://community.hubspot.com/t/custom-cta-wont-save/13225>\
**Category:** CMS Development\
**Tags:** css\
**Created:** [February 25, 2019, 8:06pm UTC](https://community.hubspot.com/t/custom-cta-wont-save/13225 "2019-02-25T20:06:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 25, 2019, 10:12pm UTC](https://community.hubspot.com/t/custom-cta-wont-save/13225/2 "2019-02-25T22:12:43Z")

</div>

Hi @penguinMarket,

how exactly do you customize the CTA?

Inside the “CTA-Area” or via CSS?

If you customize it in the CTA-Area I would recommend you to move your styling to the main CSS file.

Example(inputs in the “custom css” area of the CTA button;I’ve just wrote something down)

```auto
background-color: #fafafa;
color:#333;
border:1px solid #fff;

```

if this doesn’t get saved or don’t work - there are a few options what could be the problem:

**1.** you main CSS file has, like nearly every HubSpot CSS file some (basic)styling for CTA-buttons and “overwrites” your custom styling

**2.** your code has invalid inputs and HubSpot deletes it

**3**. you have selected “simple”(or something else) as “button-style”. For best results you should try to change it to “link(no style)” and enter all your custom CSS below.

…

Personally I would never style (every) CTA-button with custom CSS inside the button creation.

The “best-case” (imo) is:

- open your main css file (or the one which is used by the template)

- create a new class like “.my-nice-looking-cta-button”

- assign all of your custom css code to this class

- save the CSS file

- assign the class to your CTA-button

with this method you have not to style every CTA-button again and again.

If we take the example code from above it would look like this with the “class-solution”

**CSS:**

```auto
.my-fancy-cta-button{
background:#fafafa;
color:#333;
border:1px solid #fff;
}

```

**“CTA-area”:**

- enter “my-fancy-cta-button” as custom CSS-class in the CTA-button options

Also - if you open “advanced options” in the CTA creation view and check/select the auto-size option, the CTA will be always as width as possible(if there is no max-width in the CSS)

Hope this helps.

If you need fourther help, I can help you.

regards

Anton

|

 ![check.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/c/0cb6398cd51b552c2b96a36cf031f5e476e2c9bc.png)  
| Did my post help answer your query? Help the Community by **marking it as a solution** |  
| — | — |

---

_[View the full topic](https://community.hubspot.com/t/custom-cta-wont-save/13225)._
