Is there a way to change the color of the background color of an entire form?

fpuzon
Tera Contributor

Change Form Background Color.jpg

I'm trying to change the background color from white to a color of choice.   I would like the color to be constant and not onLoad or onChange or anything like that.   I found how to do this on labels, but not on the entire form?   I would also like to be able to do this on multiple forms.   Any help would be greatly appreciated.

Thanks,

Fred

7 REPLIES 7

Joe Wilmoth
ServiceNow Employee
ServiceNow Employee

In the CMS Portal?



If so, you'll want to see which theme the site is using. Click into the theme, create a new stylesheet. Use Dev Tools   — in Chrome or Firefox — to find the class or id of the background, then use CSS to change the color of the background.



Example:



.CLASS_OR_ID {


        background-color: #eee;


}


Manjul Katare
ServiceNow Employee
ServiceNow Employee

Hi Fred,



There are multiple places where you would need to change the background-color if you want to apply on the entire iFrame content. For instance, The screenshot shared, you would have to change the background color of the page, and   then background color of   some tables as well which is a wrapper for form contents.



If you want a background color just for form, you can take below snippet and add it to your CSS:


/* Its tested on https://<instance-name>.service-now.com/ess/ask_question.do */



#item_table,


#item_table table { background: #f4f5f6; }



The end result would be something like this:


Screen Shot 2015-12-09 at 3.56.50 PM.JPG



Hope this help!


-Manjul


Ni Manjul,
I finally got around to try and change the color of just our form by adding the following code in my style sheet, but the form doesn't seem to be changing to that color.   I inspected the form and I'm pretty sure I'm adding the below code to the correct style sheet.   Do you mind providing a screen shot of where exactly in the style sheet you added this logic?   Any help would be appreciated.   Thanks Manjul!



Fred



#item_table,


#item_table table { background: #f4f5f6; }


Could it be that my instance is on Geneva?