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
rfanningrfanning 

How do I use salesforce's CSS

I have two separate problems that deal with salesforce's CSS

 

Problem 1:  I want to use the salesforce CSS default background color for a detail display. I have a custom visualforce page that uses the standard Contact Controller and is placed inside the Contact view.  If I do not put a background color on my visualforce page, whitespace is shown where my page ends which looks shabby.

 

Currently I am hardcoding it as:

<style type="text/css" media="screen">body{background-color: #F3F3EC;}</style>

 

Problem 2:  I have another custom visualforce page that gets passed a salesforce contact id.  I would like to display the contact's name in the same CSS style that the Contact view uses for continuity.

 

 

Thanks in advance!

paul-lmipaul-lmi

Using SF CSS is outlined in the Visualforce developer guide.

 

Using Salesforce CSS styles