I need to override the css styling of the user profile page. The overriding of css is mostly stuff like changing page background color from blue to red, changing page font to Verdana 9pt etc. enter image description here

I have already done sfdc css overriding using custom component with custom css attached to the left sidebar. See following image for example. This the way I want to make the user profile page look like

However few of the sfdc pages in the org do not have left sidebar or right side bar div's, like chatter, user profile etc. I want to know if anyone has ever tried customizing css for these pages.

Another solution that I can think of is creating vf pages for showing user profile and redirecting the user to that vf page instead of the standard user profile page, but I dont know how this can be achieved or is it even possible.

Help is much appreciated.

  • Sorry my idea didn't work :( – Sai Jul 10 '13 at 19:38
  • Dont be, it was innovative though. – codeinprogress Jul 10 '13 at 19:45

Disclaimer, I did not test this. And this is totally against the recommendations of salesforce as HTML on page can change due to many factors.

You can try adding your CSS file as a document file and then inserting it as a logo for the app.

enter image description here

enter image description here

  • How can I upload a text file in place of image??? – codeinprogress Jul 10 '13 at 18:36
  • Goto documents tab and click on a "New". You will see screen similar to my pic-1. from here "Choose" the text file but mark the "Externally" available Image" as true. Now go to Setup -> Create -> Apps and click edit next to the App you want to modify, you will see screen similar to my pic-2. – Sai Jul 10 '13 at 18:43
  • uploaded the css file as an external image, but it made no change to the existing css of the User Profile page. – codeinprogress Jul 10 '13 at 19:05

This is a pretty odd... is it for some kind of internal branding requirement?

  1. you could expose your org using Salesforce Communities which allows global CSS injection,

  2. use REQUIRESCRIPT() in Custom Buttons to inject JS that injects CSS, (do not recommend)

  • yes it is an internal branding requirement. The global css injection works only for customer portal. I dont know how the standard chatter, user profile or reports and dashboards can be exposed. – codeinprogress Jan 8 '14 at 15:42
  • Right... If you can upgrade your Customer Portal to a Salesforce Community, all your users become almost-first-class citizens with access to Chatter, Users and Dashboards. And a nice UI. – bigassforce Jan 8 '14 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.