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
mikkamikka 

How to add style in sectionheader?

Hi guys,

 

Im having problem placing an attribute style in sectionheader. My css is not recognized and I've got error message when I tried to put this one:

 

<apex:sectionHeader title="{!$Label.FSW_Main}" subtitle="{!PolicyName}" styleClass="hkscs">

 

It says that styleclass is not an attribute of sectionHeader.

 

I tried doing the following but to no avail:

 

1. Inserting div

 

<div style = "hkscs" >
         <apex:sectionHeader title="{!$Label.FSW_Main}" subtitle="{!PolicyName}">
         </apex:SectionHeader>
</div>

 

2. Inserting stylesheet before the sectionheader

<apex:stylesheet value="{!URLFOR($Resource.ESW2Style_HKSCS ,'newESUIStyle.css')}" />

 

 

I need to add style to my text in order for some Chinese text to appear perfectly inside the sectionheader.

 

Hope you can figure this one out.

 

Thanks for your help.

bob_buzzardbob_buzzard

The only way I can think of to influence the existing style is to override it, either in page or from a css.  E.g., this style changes the style of the 'title' attribute:

 

 

 <style>
   body .bPageTitle .ptBody .pageType
   {
      color: red;
   }
  </style>

However, this is (a) fragile, as if SFDC change their styling you'll need to figure out the new css to override and (b) likely to break the styling of other parts of the page.

 

A better solution would be to recreate the sectionheader component with one of your own devising - you could simply lift the HTML from the page and specify your own style classes I would have thought.

 

 

 

mikkamikka

Thanks bob. I've finally got a way by creating a div tag that will function like a section header in apex. 

 

Thanks again Mikka ^_^