Skip to main content

Theme Headers & Footers

CTFd allows for admins to set Cascading Style Sheets (CSS) rules and JavaScript (JS) code that applies to the user facing portion of the site. This allows admins to make simple style changes without having to create entirely new custom themes.

The configured theme must have been programmed to use this behavior.

Theme Header

In the admin panel, under Config > Appearances, you can edit the CSS & JS used for your CTFd instance as part of the theme header.

The theme header is loaded as part of the <head> element before the <body> tag of the page. Here you can add whatever HTML, CSS, or JS you would like such as changing the fonts or scripts used for your theme.

You can also edit the CSS & JS loaded through the Theme footer as well. The theme footer is loaded at the end of the page, just before the closing </body> tag.



Setting the theme header as such will change the font to a different family.

:not(i) {
font-family: "Oswald", sans-serif !important;


With JavaScript specifically you will oftentimes want to wait to run your script last after CTFd's existing theme code runs. This can be done by defining your script tags as modules. For example:

<script type="module">
alert("Running after all other modules are loaded");

Theme Settings


The configured theme must have been programmed to use the settings behavior by providing the config.html file with a form defining the configuration options.

Theme settings provides specific setting options for certain themes inside of the Settings Editor. For the core theme you can choose challenge-window-size, which specifies how wide the modal pop-up for challenges will be (small, normal, large, extra large). For the learning theme you can select challenge-window-size and Challenge Ordering.