# Form background change

**URL:** <https://community.hubspot.com/t/form-background-change/123853>\
**Category:** Blog, Website & Page Publishing\
**Tags:** forms\
**Created:** [January 14, 2025, 5:15am UTC](https://community.hubspot.com/t/form-background-change/123853 "2025-01-14T05:15:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimj50](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kimj50](https://community.hubspot.com/u/kimj50)\
**Post date:** [January 14, 2025, 5:15am UTC](https://community.hubspot.com/t/form-background-change/123853/1 "2025-01-14T05:15:27Z")

</div>

![kimj50_0-1736831354359.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/6/c6ed19aa8dcc67d6e71c8a5040d269ff616cec43.png)

Hi, I adjusted the width of the size of the form to be 50%.

But it remains the awkard empty white pieces on the right, how can I remove them and sort all the contents to the center.

Thx.

---

<div class="post-metadata">

**Author:** ![Jigar\_Thakker](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jigar_thakker/32/63606_2.png) [@Jigar\_Thakker](https://community.hubspot.com/u/Jigar_Thakker)\
**Post date:** [January 14, 2025, 8:07am UTC](https://community.hubspot.com/t/form-background-change/123853/2 "2025-01-14T08:07:03Z")

</div>

Hi @kimj50,

To centre the form and remove the white spaces that you happen to see on the right try adjusting your CSS by using margin: 0 auto; to horizontally centre the form within its container and also ensure that module settings allow for custom CSS in case you use a specific module.

Additionally set the parent container to have no extra padding or margin.

For your reference: [Edit content in the content editor](https://knowledge.hubspot.com/marketing-email/how-do-i-center-an-image-cta-or-logo-in-an-email)

If this helps, feel free to mark it as the solution

✔

and give it an upvote

👍

! Let me know if you have further questions!

---

<div class="post-metadata">

**Author:** ![kimj50](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kimj50](https://community.hubspot.com/u/kimj50)\
**Post date:** [January 14, 2025, 8:24am UTC](https://community.hubspot.com/t/form-background-change/123853/3 "2025-01-14T08:24:33Z")

</div>

Sorry but can you explain it a bit more in detail of how to adjust CSS. I have made the form from Marketing → form and do not see any section that I can adjust them.

---

<div class="post-metadata">

**Author:** ![Jigar\_Thakker](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jigar_thakker/32/63606_2.png) [@Jigar\_Thakker](https://community.hubspot.com/u/Jigar_Thakker)\
**Post date:** [January 14, 2025, 9:11am UTC](https://community.hubspot.com/t/form-background-change/123853/4 "2025-01-14T09:11:28Z")

</div>

Hi @kimj50,

- Start by opening the form and copy the embed code and paste in the page you want it to appear.

- Add custom CSS:

If your site is hosted on HubSpot, You can add custom CSS to a form in the advance options of the page setting where the form is added; there is a section to add codes to the HTML.

Follow these steps here: [Create and customize pages](https://knowledge.hubspot.com/website-and-landing-pages/create-and-customize-pages)?

If the site is not hosted on HubSpot, you can do it through the form settings itself.

Follow these steps here: [Set up and style a legacy form on an external site](https://knowledge.hubspot.com/forms/how-can-i-share-a-hubspot-form-if-im-using-an-external-site)?

If this helps, feel free to mark it as the solution ✔ and give it an upvote 👍 ! Let me know if you have further questions!

---

<div class="post-metadata">

**Author:** ![kimj50](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kimj50](https://community.hubspot.com/u/kimj50)\
**Post date:** [January 14, 2025, 9:21am UTC](https://community.hubspot.com/t/form-background-change/123853/5 "2025-01-14T09:21:40Z")

</div>

Then is there no way that I can remove that white section from form creation page?
