+ Start a Discussion
Chamil MadusankaChamil Madusanka 

Access standard CSS of standard page layout

I want to change the look and feel of salesforce pages. That mean, I want to use standard page layout but want to change the CSS of that standard page layout. But I couldn't find a way to access CSS for editing.

If anyone aware with this kind of problem, please help.

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

The CSS isn't accessible for editing in that way.

 

The only way that I've found to achieve this is to create my own styles that have the same name as the standard styles and therefore override them.

 

However, this is very fragile, as Salesforce could rename CSS elements which would then bypass the override, leaving you with a mixture of standard and custom css.

 

We use Visualforce pages when we need this level of control.

All Answers

bob_buzzardbob_buzzard

The CSS isn't accessible for editing in that way.

 

The only way that I've found to achieve this is to create my own styles that have the same name as the standard styles and therefore override them.

 

However, this is very fragile, as Salesforce could rename CSS elements which would then bypass the override, leaving you with a mixture of standard and custom css.

 

We use Visualforce pages when we need this level of control.

This was selected as the best answer
john hejohn he

hi bob_buzzard,


you mentioned that you override the standard CSS via defining the same class name.  could you share more on this area?  I want to know how to override it? 

 

thank you so much!

bob_buzzardbob_buzzard

I use chrome inspector or similar to look at the HTML markup generated for an element I want to change, so that I can determine the style class or classes. After that it depends on the page, but often a sidebar HTML area does the trick.

 

I'd never use it for a customer system though - too fragile.

john hejohn he

hi bob_buzzard


got it, thank you for your reply!