Is it possible to color the sections/tab?

SanjivMeher
Kilo Patron
Kilo Patron

I want to have different colors for each tab in my CMDB module. Is it possible to do so?


Please mark this response as correct or helpful if it assisted you with your question.
1 ACCEPTED SOLUTION

saisowmya
Giga Expert

Hi Sanjiv,



Hope you are asking something as below.


find_real_file.png





You can achieve this by writing a on load client script on your table:



Script:


function onLoad() {


    //Type appropriate comment here, and begin script below


var tabs = document.getElementsByClassName('tabs2_tab');


tabs[0].style.backgroundColor = 'red';


tabs[1].style.backgroundColor = 'green';


tabs[2].style.backgroundColor = 'orange';


tabs[3].style.backgroundColor = 'blue';


tabs[4].style.backgroundColor = 'yellow';



}



section numbers starts from 0. Replace the tab number with your required number to add color to that particular tab/section.



If you want to add colors to related lists as below , the next number will be followed in the script.


find_real_file.png




Please mark the answer as correct, if your issue is resolved


View solution in original post

11 REPLIES 11

This works on Global application. Can you suggest the changes for scoped? Thanks in advance.

I know this is an old thread but I have used the TAB font colour and it works well, however the darker colours are no good as the text is black.

Does anyone know how to change the tab font colour.
We have tried the following code and it does not change the colour 

 

function onLoad() {

// Change Colour of Tabs on a form

var tabs = document.getElementsByClassName('tabs2_tab');

tabs[0].style.backgroundColor = 'red';
//Tried this code for
tabs[0].style.color = 'white';

}

Tisshows the change but the colour does not change!

 

find_real_file.png

 

we inspect the background code and this

find_real_file.png

 

Hopefully someone can help/suggest

 

 

i have tried this on the legal table in Orlando and nothing happens.

This did not work in Paris.

This script is not working for me, do i need to put somthing else in place of "tabs2_tab".

Please help!..