Title: How can I change the colors of a single row?
Author: Tobias Bäthge
Published: December 2, 2012
Last modified: May 14, 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 a single row?

Changing the text and the background color of a single row, e.g. to highlight it,
can be done with some CSS like this:

    ```language-css
    .tablepress-id-N .row-X td {
    	background-color: #ff0000;
    	color: #00ff00;
    }Code language: CSS (css)
    ```

where `N` (the table’s ID), and `X` (the number of the row) need to be adjusted 
to your table! `#ff0000` is the HEX color code of the desired color, in this case
red. You can change both the text color (via the `color` property) and the background
color (via the `background-color` property).

This CSS code needs to be entered into the [“Custom CSS” text field](https://tablepress.org/faq/adding-custom-css/)
on the “Plugin Options” page of TablePress.