Search code examples
htmlcsshubspot

Hubspot Landing Page Styles


I'm having trouble overriding the html styles when creating a landing page in HubSpot. I want to add

html {
  overflow-x: hidden
}

but it keeps defaulting to

html {
  overflow: auto
}

I've tried !important, adding it to the head, to the footer, to a custom html module, etc. but I cannot override the default HubSpot styles.


Solution

  • Specificity: if the html tag has a class or id attribute, then select it to override the native one.

    html.page {
      overflow-x: hidden;
    }
    

    Either that, or inline the style into the html page if you have access to it.