Title: Make specific words a certain colour
Last modified: August 20, 2016

---

# Make specific words a certain colour

 *  Resolved [MarkFL](https://wordpress.org/support/users/markfl/)
 * (@markfl)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/)
 * Hi Tobias,
 * I’m a newbie and loving the plugin. I need to add 30 tables which are all very
   similar and I want to have specific words (such as “Trumpet”) that appear in 
   various different cells formatted red. I could do it via the advanced editor 
   I guess (although I can’t make the code I put in there work for some reason) 
   but is there a way via the Custom CSS? TY Mark.
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/#post-3534096)
 * Hi Mark,
 * thanks for your question.
 * The problem here is that CSS code can not be used to find specific content. It
   can only match “meta” data that is associated to each element on a page.
    Therefore,
   it is necessary to wrap the desired content (like “Trumpet”) in an element that
   then can be styled with CSS code.
 * The solution to this is to indeed wrap the word in HTML code, and the Advanced
   editor can be used for that, indeed (although it doesn’t directly offer a function
   for this).
    You would basically have to wrap “Trumpet” like this:
 *     ```
       <span class="highlight-red">Trumpet</span>
       ```
   
 * similar to how it is explained in the question “How can I highlight certain cells
   or their content?” in the TablePress FAQ at [http://tablepress.org/faq/](http://tablepress.org/faq/)
 * If you have very many occurances of this word, a more automatic solution could
   be considered. This would however involve programming of a custom Extension in
   PHP code, that uses the available filters in TablePress to manipulate and extend
   the data in the table, before it is printed on the page.
 * Regards,
    Tobias
 *  Thread Starter [MarkFL](https://wordpress.org/support/users/markfl/)
 * (@markfl)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/#post-3534121)
 * Thanks Tobias, what a quick reply! It’s looking like I’m going to need the custom
   extension. Cheers, Mark
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/#post-3534170)
 * Hi Mark,
 * no problem, you are welcome for the quick answer 🙂
 * About the custom Extension: Unfortunately, I don’t have the code for this readily
   available for usage. Also, this is more work than what I can give away as free
   support right now, due to time constraints and being very busy at the moment.
   I can however offer to develop this for you, if you compensate me for my time
   and effort. If that would be an option for you, I suggest that you send me an
   email (the address is in the main plugin file “tablepress.php”), so that we can
   discuss details.
 * Regards,
    Tobias
 *  [cgc-mike](https://wordpress.org/support/users/cgc-mike/)
 * (@cgc-mike)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/#post-3534362)
 * Hi Tobias
 * I’m trying to do a similar thing by styling a single cell that may move position,
   so want to do it with…
 * <span class=”highlight”>Text in cell</span>
 * and add a class in Plugins – Custom CSS
 * .highlight {
    background-color: #ffe400; font-weight: bold;
 * However while this does change the text to bold it only changes the background
   directly behind the text and not the background for the whole cell. How would
   change the background colour for the whole cell?
 * Thanks
    Mike
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/#post-3534363)
 * Hi Mike,
 * thanks for your question.
    That’s not possible with this approach, unfortunately.
   The `<span>` is a new element in the page, and it can not influence the background
   color of its parent element (the table cell). If you really want this, you’ll
   need to use the CSS based approach with column and row numbers from the same 
   question in the TablePress FAQ at [http://tablepress.org/faq/](http://tablepress.org/faq/)
 * Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Make specific words a certain colour’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [formatting](https://wordpress.org/support/topic-tag/formatting/)
 * [text](https://wordpress.org/support/topic-tag/text/)

 * 5 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/make-specific-words-a-certain-colour/#post-3534363)
 * Status: resolved