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.
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 |
|---|---|
| Your knowledge base website |
| 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 |
|
Every page | Header |
|
Every page | Header logo |
|
Every page | Header links |
|
Every page | Footer |
|
Article | Breadcrumb |
|
Article | Article title |
|
Article | Article body |
|
Article | Paragraphs and tables in articles |
|
Article | Rating buttons |
|
Contact | Page title |
|
Contact | Contact form |
|
Contact | Submit button |
|
Classic layout only
Page | Element | Selector |
|---|---|---|
Every page | Navigation bar |
|
Every page | Banner |
|
Every page | Search box |
|
Every page | Search input |
|
Home | Banner title |
|
Home | Categories section |
|
Home | Category cards grid |
|
Home | Each category card |
|
Home | Card icon, name, description and article count |
|
Home | Popular articles section |
|
Home | Each popular article |
|
Category | Category title |
|
Category | Article list |
|
Category | Each article in the list |
|
Category and article | Category sidebar |
|
Article | Article box |
|
Article | Related articles |
|
Documentation layout only
Page | Element | Selector |
|---|---|---|
Every page | Navigation sidebar |
|
Article | Page rail beside the article |
|
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.
Still need help?
Contact us