How to add custom CSS for my help center?

Markdown

View as Markdown

Custom CSS lets you change how your knowledge base looks, for example fonts, colors and spacing, so it matches your brand. To change your primary color, banner and logo without code, see How to design the Helpcenter Knowledge Base?

Note

Custom CSS and custom JavaScript are available on the Business and Unlimited plans.

Open the Custom code tab

Go to your Helpcenter dashboard and click the gear icon at the bottom left. Go to Knowledge Base › Knowledge bases, select your knowledge base, then open the Custom code tab.

Knowledge bases › Custom code tab with the Custom CSS box

Add your CSS

Paste your CSS into the Custom CSS box and click Save changes. Paste plain CSS, without <style> tags. The box holds up to about 100,000 characters.

Always start with a page selector

Begin every rule with one of these selectors. They make your rule specific enough to override Helpcenter's own styles, and they control where it applies:

Selector

Styles

#hc-website

Your knowledge base website

#hc-widget

The Help tab inside the chat widget

For example:

/* Bigger article text */
#hc-website #article-content p {
  font-size: 18px;
  line-height: 1.7;
}

/* Lighter borders on tables in articles */
#hc-website #article-content table td {
  border-color: #eeeeee;
}

/* Rounder category cards on the home page (Classic layout) */
#hc-website [id="category-item"] {
  border-radius: 16px;
}

Without the selector, a rule may not take effect, because Helpcenter's styles load after yours.

What custom CSS can style

  • Your knowledge base website, including its search and AI chat.

  • The Help tab in the chat widget. It shows your default knowledge base, so it uses the default knowledge base's custom CSS.

  • The widget's Home and Chat screens and the launcher button can't be styled with custom CSS. To change their colors and appearance, see How to design the Helpcenter widget?

Elements you can target

Which elements are on a page depends on your knowledge base layout, Classic or Documentation. See How to change the layout of your knowledge base website?

Both layouts

Page

Element

Selector

Every page

Page content

#page-content

Every page

Header

#header-section

Every page

Header logo

#navbar-logo

Every page

Header links

#navbar-links

Every page

Footer

#footer

Article

Breadcrumb

#breadcrumb

Article

Article title

#article-title

Article

Article body

#article-content

Article

Paragraphs and tables in articles

#article-content p, #article-content table

Article

Rating buttons

#article-rating-buttons

Contact

Page title

#contact-us-title

Contact

Contact form

#contact-form

Contact

Submit button

#contact-form-submit

Classic layout only

Page

Element

Selector

Every page

Navigation bar

#navbar

Every page

Banner

#banner

Every page

Search box

#banner-search

Every page

Search input

#search-input

Home

Banner title

#banner-title

Home

Categories section

#category-list

Home

Category cards grid

#category-list-cards

Home

Each category card

[id="category-item"]

Home

Card icon, name, description and article count

[id="category-item-icon"], [id="category-item-name"], [id="category-item-description"], [id="category-item-count"]

Home

Popular articles section

#popular-articles

Home

Each popular article

[id="popular-articles-item"]

Category

Category title

#article-list-title

Category

Article list

#article-list-container

Category

Each article in the list

[id="article-item"]

Category and article

Category sidebar

#category-sidebar

Article

Article box

#article-container

Article

Related articles

#related-articles

Documentation layout only

Page

Element

Selector

Every page

Navigation sidebar

#docs-sidebar

Article

Page rail beside the article

#docs-page-rail

Repeated items: cards and list rows that appear many times on a page share the same ID, such as category-item or article-item. Target them with an attribute selector, for example [id="category-item"], so your rule applies to every one of them.

Avoid targeting other class names, such as layout utility classes. They can change when we update Helpcenter.

Tips

  • Try your changes in your browser's developer tools first, then paste the final CSS.

  • Check your help center on mobile as well as desktop.

  • To add scripts such as Google Analytics, use the Custom JavaScript box on the same tab. Add your code inside <script> tags, and only add code you trust. See Google Analytics integration.

Was this article helpful?

Still need help?

Contact us