# Remove heading margin on form

**URL:** <https://community.hubspot.com/t/remove-heading-margin-on-form/128881>\
**Category:** Tips, Tricks & Best Practices\
**Tags:** forms\
**Created:** [March 28, 2025, 4:04pm UTC](https://community.hubspot.com/t/remove-heading-margin-on-form/128881 "2025-03-28T16:04:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheAki](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@TheAki](https://community.hubspot.com/u/TheAki)\
**Post date:** [March 28, 2025, 4:04pm UTC](https://community.hubspot.com/t/remove-heading-margin-on-form/128881/1 "2025-03-28T16:04:12Z")

</div>

Hello,

On mobile my form is too big and doesn’t fit in the viewport, one issue is that the margin is too large between the rich text and heading of the form, can I remove it? I attached a picture so you know what I’m talking about.  
I tried adding this styling to my page, but it doesn’t work:

.hsfc-Heading {  
margin:0;  
}

 ![TheAki_0-1743177763696.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/7/e7e56f1695c1a6b426ac51b84a27917bd30fa235.png)

---

<div class="post-metadata">

**Author:** ![CarolinaDeMares](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/carolinademares/32/22707_2.png) [@CarolinaDeMares](https://community.hubspot.com/u/CarolinaDeMares)\
**Post date:** [March 28, 2025, 4:59pm UTC](https://community.hubspot.com/t/remove-heading-margin-on-form/128881/2 "2025-03-28T16:59:02Z")

</div>

Hi @TheAki!  
There can be reasons why the stying you added didn’t work, I’ll share some below:

- **Wrong selector** :  
.hsfc-Heading might not be the correct class for the heading in your form. HubSpot forms often use different class names, depending on how the form is embedded or styled via the drag-and-drop editor or custom modules.

- **Specificity or override issues** :  
Even if .hsfc-Heading is the right class, HubSpot’s built-in CSS or inline styles may be overriding yours. You may need to increase specificity or use !important carefully.

- **CSS not loading properly** :  
Make sure the CSS is being added to the correct place — either inside the page settings (Design \> Edit Head \> Add CSS), inside a \<style\> tag, or via the attached stylesheet.

---

<div class="post-metadata">

**Author:** ![TheAki](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@TheAki](https://community.hubspot.com/u/TheAki)\
**Post date:** [March 28, 2025, 11:33pm UTC](https://community.hubspot.com/t/remove-heading-margin-on-form/128881/3 "2025-03-28T23:33:31Z")

</div>

That’s what I did, found out it’s a class called hsfc-Heading, but the selector doesn’t do anything (I added !important), I checked in the code and the styling is in there. Could it be that I can’t style the embedded form?

 ![TheAki_0-1743204684920.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/1/140ac6ae8e3ec3c9f389fe9e4f6db381c5f00c26.png)

---

<div class="post-metadata">

**Author:** ![Wesimplifi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wesimplifi/32/26662_2.png) [@Wesimplifi](https://community.hubspot.com/u/Wesimplifi)\
**Post date:** [April 1, 2025, 11:29am UTC](https://community.hubspot.com/t/remove-heading-margin-on-form/128881/4 "2025-04-01T11:29:35Z")

</div>

Hi @TheAki ,

The issue you’re facing is outside the form itself, likely due to external styling affecting the spacing. You may need to adjust the parent container or use more specific CSS rules.

If this still doesn’t work, could you share the link to the page where the form is embedded? That way, I can inspect the styles applied and provide a more accurate solution.

---

<div class="post-metadata">

**Author:** ![TheAki](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@TheAki](https://community.hubspot.com/u/TheAki)\
**Post date:** [April 1, 2025, 1:19pm UTC](https://community.hubspot.com/t/remove-heading-margin-on-form/128881/5 "2025-04-01T13:19:52Z")

</div>

Here is the page: [Automatizujte Svoj Call Centar Uz Naš AI Voicebot](https://oneclick.rs/voicebot-landing/)
