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
Madhura BMadhura B 

Inline Visualforce Style

Hi

 

I have an inline visualforce added to my standard contact page. All works fine but the field font doesn't match with the standard salesforce style.

Could anybody please tell me what style should be added for this to be achieved

 

<apex:page standardController="Contact" extensions="contactSubRecords" tabstyle="Contact" showheader="true">

<apex:pageBlock >
<apex:pageblockSection title="Alumnus"  columns="1" rendered="{!if(contact.Alumnus__c==True,true,false)}">
<apex:tabPanel switchType="client" value="{!selectedTab}" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<apex:tab label="Alumnus"  > 
  <apex:pageBlock >
   <apex:pageBlockSection title="Alumnus Details">
			<apex:outputField value={!Contact.field1__c}" />
			<apex:outputField value="{!Contact.field2__c}" />
   </apex:pageBlockSection>
 </apex:pageBlock> 
</apex:tab>
</apex:tabPanel>
</apex:pageblockSection>
</apex:pageBlock>
<apex:page>

 

Best Answer chosen by Admin (Salesforce Developers) 
MoUsmanMoUsman

Please try this Visual force page,If it does not work please let me know.

<apex:page standardController="Contact" extensions="contactSubRecords" tabstyle="Contact" showheader="true">
<style>
body{
  font-family: Arial,Helvetica,sans-serif !important;
  color: #222 !important;
}
</style>
<apex:pageBlock >
<apex:pageblockSection title="Alumnus"  columns="1" rendered="{!if(contact.Alumnus__c==True,true,false)}">
<apex:tabPanel switchType="client" value="{!selectedTab}" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<apex:tab label="Alumnus"  > 
  <apex:pageBlock >
   <apex:pageBlockSection title="Alumnus Details">
			<apex:outputField value={!Contact.field1__c}" />
			<apex:outputField value="{!Contact.field2__c}" />
   </apex:pageBlockSection>
 </apex:pageBlock> 
</apex:tab>
</apex:tabPanel>
</apex:pageblockSection>
</apex:pageBlock>
<apex:page>

--

Regards

Usman

All Answers

MoUsmanMoUsman

Hi madhura.b,

 

Use this standard Style for contact detail page

<style>
body{
  font-family: Arial,Helvetica,sans-serif;
  color: #222;
}
</style>

 --

Regards

Usman

Madhura BMadhura B

Hi Usman

 

It didn't change. :(

MoUsmanMoUsman

Can you please post your complete code of VF page?

Madhura BMadhura B

Above posted code is the complete code

MoUsmanMoUsman

Please try this Visual force page,If it does not work please let me know.

<apex:page standardController="Contact" extensions="contactSubRecords" tabstyle="Contact" showheader="true">
<style>
body{
  font-family: Arial,Helvetica,sans-serif !important;
  color: #222 !important;
}
</style>
<apex:pageBlock >
<apex:pageblockSection title="Alumnus"  columns="1" rendered="{!if(contact.Alumnus__c==True,true,false)}">
<apex:tabPanel switchType="client" value="{!selectedTab}" tabClass="activeTab" inactiveTabClass="inactiveTab" >
<apex:tab label="Alumnus"  > 
  <apex:pageBlock >
   <apex:pageBlockSection title="Alumnus Details">
			<apex:outputField value={!Contact.field1__c}" />
			<apex:outputField value="{!Contact.field2__c}" />
   </apex:pageBlockSection>
 </apex:pageBlock> 
</apex:tab>
</apex:tabPanel>
</apex:pageblockSection>
</apex:pageBlock>
<apex:page>

--

Regards

Usman

This was selected as the best answer
Madhura BMadhura B

Thanks Usman

 

!important worked. Also I had to put the whole pageblock in a div tag and give the style for it to take effect.