1

I have a requirement to change the standard tab styles, i.e.

enter image description here

to something like this:

enter image description here

I can't find anything on the web which deals with this - obviously you can change the tab icons for when you click on the tab but that's about it. I would need to add an icon, change the background color, font, etc.

The client is sure he's seen this kind of customization been done before. Is there any way?

5

You cannot change the styles of the standard tabs. You can however set tab-styles via the 'Tab' setup for a custom object or VF tab.

I've done the JS manipulation with using non-standard controllers and tabs like this before, but it was less than ideal and not very stable.

1

I am sure that you can do this using Jquery libs/using VF Pages, But not too sure if you could override the style sheets of the tabs used by SFDC by default.

Would be interesting read if some one says yes and posts a solution for this.

  • I'm pretty sure that you cannot change the style of the standard apps and tabs. – Mike Chale Sep 21 '12 at 19:31
  • If I override the tab stylesheets would I not just be doing that for a single VF page? If I need the tabs to be changed permanently, would I not have to replace every single page with a VF? – George S. Sep 21 '12 at 20:23
1

It can be done in Partner because you get a header / footer you can inject JS/HTML into in order to override the SF styles (Basically, you are re-writing the SF CSS on the fly) and I've done this on occasion. Given the ability to add HTML sections to the navigation sidebar this approach could theoretically be applied to the standard SF UI (as long as the side bar is displayed).

The client should be warned it will likely require support and maintenance over time if/when SF changes its CSS.

  • I concur it might technically be possible using some 'hacks' but just because you can doesn't mean you should. – Jason Lawrence Sep 24 '12 at 6:06
  • Oh, I completely agree with the 'because you can, doesn't mean you should', but when the client insists and the alternatives don't exist... – Steven Herod Sep 24 '12 at 22:01
1

I would not really recommend to do this, it would cause a lot of checking in html tags and a lot of work to implement a new style and what is the benefit?

and like Steven Herod says if salesforce changes again some styles or tag names then you would need to update your code also.

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.