function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KatherineCKatherineC 

How to change background color or add a theme?

Hi All,

Is it possible to change the background of the header (the area above all Tabs) on all pages like? Right now it's blue, we want some other color. Please advise.
Deepak Kumar ShyoranDeepak Kumar Shyoran
If want to change the color/Theme for native Salesforce pages then create a HTML home page component and can modify the css easily to change the theme/style.

Please mark it as best solution to your problem if it does solve your problem.
KatherineCKatherineC
Hi Deepak,
Could you tell me how to modify the css? Any steps I can follow?
Thanks in advance.
Katherine
Deepak Kumar ShyoranDeepak Kumar Shyoran
If you want to change the color for custom V.F then you can easily do this by overriding CSS of  Salesforce Pages with some small css tricks and you can get the css of Salesforce component using inspect element feature of browser.

Here is a link for the same type of problem.
https://developer.salesforce.com/forums?id=906F00000008zbmIAA

Please mark this post as best solution to your problem if it does solve your problem.
KatherineCKatherineC
My screen doesn't have the Show Html checkbox when I tried to create the html home page component, so can not make codes work here. Did salesforce stop this option already? We signed up salesforce this year and still new to V.F.
User-added image no such option on my screen
User-added image
bob_buzzardbob_buzzard
You can't create homepage components containing JavaScript since the summer 14 release went live.  Existing homepage components that contain JavaScript will work until Summer 15, at which time they are planned to cease functioning and hacks such as this will suddenly stop working and nobody will be able to fix them.

One key point that Deepak hasn't mentioned is that what he is advising you to do is completely unsupported.  Salesforce have said many times that you should not override their CSS as they may change it without notice, which will cause any overrides to suddenly stop working and the original Salesforce colour themese to reappear. 

The only supported way to override the standard Salesforce look and feel is via Visualforce page overrides - unfortunately you can't override absolutely everything (the home page, for example), but you can set up Visualforce pages as the default page for applications, which amounts to the same thing. Its a lot of work though, as you'd have to rebuild the tabs, global search etc yourself, and I really wouldn't advise doing it unless there is no alternative.
KatherineCKatherineC
Hi Bob,
Appreciate your information. Have a nice day.
Katherine
roni shoreroni shore
in CSS use in the default
.This{
background-color = white;
height = 1000px;
}

works for me