Jump to content
  • 0

Change background color of certain columns


matstein

Question

I am making a database to track oil change intervals, I'm basing it off a excel sheet the users currently use and I would like to make certain columns have a different colored background like below.  These won't be based on certain criteria or anything,  I always want the columns to have the green or blue backgrounds no matter the data.  Thank you for your help!

 

 

image.thumb.png.1a5d57acf2b8bc14d13b50a4d581b6f3.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hey @matstein,

Please refer to this article:

Something like this will work. Change the number within the () depending on which row you want to change color. Make sure to add this in your Header section of the Results Page Configuration and have 'Enable HTML Editor' unchecked.

 

<style>
td[class*="cbResultSetData"]:nth-of-type(5){

background-color: red !important;

}
</style>

 

Link to comment
Share on other sites

  • 0

Hi @matstein,
 

1 hour ago, kpcollier said:

 

Something like this will work. Change the number within the () depending on which row you want to change color. Make sure to add this in your Header section of the Results Page Configuration and have 'Enable HTML Editor' unchecked.

 


<style>
td[class*="cbResultSetData"]:nth-of-type(5){

background-color: red !important;

}
</style>

 

To learn more regarding "CSS :nth-child() Selector", you may check it here: https://www.w3schools.com/cssref/sel_nth-child.asp and you can also test it there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...