Feb 12, 202410:43 AM - edited Mar 27, 20246:39 AM
Participant
Forms Design Custom
SOLVE
Hello HubSpot Developer Community,
I'm working on integrating a HubSpot form into our website (Strapi), and while the embedding process went smoothly, I've encountered a few styling challenges that the standard HubSpot form styles and options don't quite address. I’m hoping to get some guidance or CSS hacks that could help me customize the appearance of this embedded form to better match our site's design.
Here are the specific customizations I’m looking to implement:
Remove Shadow: The default form comes with a shadow effect. I need to remove this to fit our flat design aesthetic better.
Round Corners: Our design language uses rounded corners, and I'd like the form inputs and the form itself to reflect this with a specific radius.
Background Color Match: The form's background is currently blue, which clashes with our site's grey background. I need to match the form's background color with the website's to ensure visual coherence.
Remove Extra Bottom Space: After embedding the form, there's a noticeable large space below it that doesn't align with our layout. I need a way to eliminate this extra padding or margin.
I’m looking for any advice, CSS snippets, or alternative approaches that could help me address these styling issues without breaking the form's functionality or responsiveness.
Thank you in advance for your help and suggestions!
Hi @ClaudiaOliveira happy to help with updating the styling of the HubSpot form with a little CSS.
You'll need to add this CSS to the individual page head HTML or the site head HTML depending on what you have access to, it needs to be contained in style tags unless your interface does that for you.
1 - the first code snippet for container.loaded removes the box shadow
2 - the second code snippet for hs-form_theme-round has the default border-radius of 15px, change this to your brand preferred border radius
3 - the hs-form field input snippet has three colors, I left all three so you can modify for your brand colors.
color = the text color of the input
background-color = the field color that is the blue you want to change
Hi @ClaudiaOliveira happy to help with updating the styling of the HubSpot form with a little CSS.
You'll need to add this CSS to the individual page head HTML or the site head HTML depending on what you have access to, it needs to be contained in style tags unless your interface does that for you.
1 - the first code snippet for container.loaded removes the box shadow
2 - the second code snippet for hs-form_theme-round has the default border-radius of 15px, change this to your brand preferred border radius
3 - the hs-form field input snippet has three colors, I left all three so you can modify for your brand colors.
color = the text color of the input
background-color = the field color that is the blue you want to change
By default embedded HubSpot forms are added to the page in an iFrame and due to the nature of iFrames this makes it impossible to style the content within. In this case the only styling options would be that provided by HubSpot.