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
ANKITAANKITA 

Reg: Standard styles in Salesforce

Hi,

 

How can i use standard styles in my VF page?

Could you please send some samples to understand easily.

 

Thanks,

ANKITA

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

You mean you need to apply salesforce CSS on components? Then please let me know which components??

 

As when you use <apex> components then there is no need of applying the CSS. Components are of HTML?

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

Ankit AroraAnkit Arora

You don't need to enable the standard style sheet externally as when you create a visualforce page using this 

 

<apex:page standardController="Account">
</apex:page>

This syntax automatically apply standard style sheet. If we do not want this style sheet to be enabled then we can write something like this :

 

<apex:page standardController="Account" standardStylesheets="false">

Now avoid using HTML tags in visualforce page and use native components provided by salesforce to get the standard style applied on each component.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

ANKITAANKITA

HI ANKIT,

I am very new to SFDC.

Could you please share a small example program.

 

Thanks,

ANKITA

ANKITAANKITA

I mean, I need to use some CSS in my VF page, which should native (not html CSS).

 

Thanks,

ANKITA

Ankit AroraAnkit Arora

You mean you need to apply salesforce CSS on components? Then please let me know which components??

 

As when you use <apex> components then there is no need of applying the CSS. Components are of HTML?

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer