We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jan 27, 2022 4:01 AM
hi there, I created a form and embedded it on a webflow page. is there a way to add custom CSS to it to fix its styling? here is a loom: https://www.loom.com/share/bfa83456ce93470eade3df3ebd42971d
Jan 27, 2022 8:31 AM
Hi @RElouahabi,
you can disable the default HubSpot styling by adding "css: ''" to the embed code.
it should look like this:
original embed code(example):
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
region: "na1",
portalId: "XXXXXXX",
formId: "XXX-XXX-XXX"
});
</script>
modified embed code:
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
region: "na1",
portalId: "XXXXXXX",
formId: "XXX-XXX-XXX",
css:''
});
</script>
After that you should be able to style it the way you like via CSS.
best,
Anton
![]() | Did my post help answer your query? Help the Community by marking it as a solution |