Title: How can I change the colors of the table head row?
Author: Tobias Bäthge
Published: December 2, 2012
Last modified: December 27, 2025

---

Back to: [Frequently Asked Questions](https://tablepress.org/faq/?output_format=md)•
[Documentation](https://tablepress.org/documentation/?output_format=md)

# How can I change the colors of the table head row?

This can be done with the some CSS code that needs to be added to the “Custom CSS”
textarea on the “Plugin Options” screen of TablePress:

    ```language-css
    .tablepress {
    	--head-text-color: #111111;
    	--head-bg-color: #d9edf7;
    	--head-active-text-color: #111111;
    	--head-active-bg-color: #049cdb;
    }Code language: CSS (css)
    ```

Here, the lines starting with `--` indicate [variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties)
for the colors, with `text` being the text color and `bg` denoting the background
color, of the table head and footer rows. The lines of code with `active` in the
variable name indicate the colors of hovered header cells and the colors of header
cells that are currently sorted. Just change the HEX color values as desired. You
only need to specify the lines that you want to change.

If you prefer a visual interface for changing colors, check out the [Default Style Customizer](https://tablepress.org/modules/default-style-customizer/)
feature that is part of the [TablePress premium license plans](https://tablepress.org/pricing/).

If you just want to change this for a specific table, use `.tablepress-id-N` (with`
N` being the table’s ID) as the selector, instead of `.tablepress`.

If the CSS code from above does not work, you can also try this alternative CSS 
code:

    ```language-css
    .tablepress thead tr > *,
    .tablepress tfoot tr > * {
    	background-color: #ff0000 !important;
    	color: #00ff00 !important;
    }Code language: CSS (css)
    ```

You can change both the text color (via the `color` property) and the background
color (via the `background-color` property).