Skip to main content

Hello, 

I’m putting together a landing page that has a Custom HTML form in it. 

When I add a Stylesheet in Unbounce and apply CSS code to the form’s elements, the form still looks the same.  I tested the code separately in Codepen, and it works.

I have tried !important and targeting classes/IDs, and nothing works.

I tried reaching out to Unbounce Support, and they directed me to reach out to the community instead.

 

My questions are:

– Why isn’t CSS working?

– How can I work around it and style the HTML form?

 

Thank you in advance for any help.

Hi @LMH786,

It sounds like you’re encountering some common issues with CSS in Unbounce. Here are a few things to check and try:

  1. CSS Specificity: Ensure that your CSS selectors are specific enough to override any default styles applied by Unbounce. Sometimes, even using !important might not work if there are other inline styles or higher specificity in place.

  2. CSS Loading: Double-check that your stylesheet is being loaded correctly. You can use your browser's developer tools to verify if the CSS file is being referenced and if the styles are applied.

  3. Inline Styles: Unbounce forms sometimes use inline styles that can override external stylesheets. You might need to use more specific selectors or JavaScript/jQuery to apply styles dynamically.

  4. Form Element IDs and Classes: Verify that you’re targeting the correct IDs and classes. Sometimes, Unbounce might dynamically generate or modify these, so you might need to inspect the form elements using developer tools to ensure accuracy.

  5. Caching Issues: Clear your browser cache or try accessing your page in incognito mode to rule out any caching issues.

  6. Unbounce’s Built-in Styles: Unbounce might have built-in styles that are difficult to override. You might need to add custom styles directly within the form element or use JavaScript/jQuery to apply styles.

If you continue having trouble, please share more details about the specific CSS code and HTML structure you're working with. This might help the community provide more targeted advice. You could also share a LOOM video or screenshots that would help identify the exact issue you’re facing. Alternatively, you can send the Unbounce file directly to my email: mdmahinurkhan9@gmail.com. I’ll personally review it.

I hope this helps!


Reply