Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Visualforce Development
- :
- pageBlockTable .... apex:column .... headerClass ....
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-03-2009 02:05 PM
Hello folks,
I am facing a werid issue .. not sure if this is a limitation of Visualforce.
I wanted to change the font color of the header to my pageBlockTable. I used a CSS class and assigned it to the headerClass on the apex:column inside the pageBlockTable.
<style>
.headerStyle{background-color:#638658;color:#FFFFF
</style>
<apex:pageBlockTable value="{!acc}">
<apex:column headerValue="{!accTitle}" headerClass="headerStyle">
<apex:outputLink value="/{!acc.account.Id}" target="_blank" styleClass="{!acc.style}">
{!acc.account.Name}
</apex:outputLink>
</apex:column>
</ apex:pageBlockTable>
The background color of the header is getting applied but not the font color. But If I use a data table instead of a pageBlockTable,the font color gets applied. But I need to use pageBlockTable for business reasons.
Is this a limitation ? Any hints would be greatly appreciated !
Thanks.
Solved! Go to Solution.
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-03-2009 03:03 PM
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-03-2009 07:31 PM
This is a trick of CSS, your specification must bind more tightly than the one you are looking to override
try this
<style> .headerRow .headerStyle{background-color:#638658;color:#FFFFF
F} </style>
worked for me
there was a color specified by .list th {}, the above style overrides this default
Application Architect
Check out the developer documentation | Got an idea? | Vote for this Idea!
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-03-2009 07:55 PM
Hi Ron,
Thanks a lot. This worked !!
Thanks again.
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-29-2009 07:16 AM
Ron, your solution worked great on a normal column header. I am having a problem with the font color not being set when using a facet and command link. The background color and text alignment get set, but not the font color. Any ideas?
<style> .headerRow .selectedStyle{background-color: blue;color: #FFFFFF;text-align: center;} .headerRow .nonSelectedStyle {background-color:green;color:white;text-align: center;} </style> <apex:column width="17%" headerClass="{!IF(sortExpression=='Reply__c','sele
ctedStyle','nonSelectedStyle')}" > <apex:facet name="header"> <apex:commandLink action="{!ViewData}" value="Reply To{!IF(sortExpression=='Reply__c' ,IF(sortDirection='ASC','▼','▲'),'')}" > <apex:param value="Reply__c" name="column" assignTo="{!sortExpression}" ></apex:param> </apex:commandLink> </apex:facet> <apex:outputField value="{!m.Reply__c}" /> </apex:column>
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-07-2009 05:32 AM
In addition, to use the footerClass, you bind to totalRow and not footerRow
.totalRow .yourStyle{background-color:#638658;color:#FFFFFF} <apex:column footerClass="yourStyle" value="a.name"/>
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-11-2010 07:02 AM - edited 06-11-2010 07:05 AM
I followed this trick and the CSS was being applied, but it was being overridden... So I changed my CSS to this:
.headerRow .TableTitle {
color: #CC0000 !important;
}
and it works great!
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2011 01:49 AM
Hiiii I tried to use your css trick to change the color of apex:column header but it do not change the color of the header also it doesn't change the font-size tooo
Re: pageBlockT able .... apex:colum n .... headerClas s .... font style
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-15-2011 04:17 AM
<tbody id="Level1SDCRecords"> <apex:repeat value="{!Level1SDCWrappers}" var="LevelOneProducts" id="L1SDCProducts"><tr class="dataRow" style="background-color:#D9D9D9;" onfocus="if (window.hiOn){hiOn(this);}" onblur="if (window.hiOff){hiOff(this);}" onmouseout="if (window.hiOff){hiOff(this);} " onmouseover="if (window.hiOn){hiOn(this);} " > <td class="dataCell"><apex:outputText value="{!LevelOneProducts.productName}" id="selectLine1-1" style="width:180px" /></td><td class="dataCell"><apex:inputCheckBox value="{!LevelOneProducts.SDCCheckRecord.Listed__c
</apex:repeat>
</tbody>

