0

I have looked up documentation which suggests this should be easy, yet nothing works - why do none of the style elements below get the column header to wrap? It does not wrap in classic or lightning, in preview or on a record page.

<apex:page standardController="Opportunity" extensions="ContactRolesMassEditExtension" > <apex:form> <apex:pageBlock mode="inlineEdit" > <apex:pageBlockButtons location="bottom"> <apex:commandButton action="{!save}" value="Save" id="saveButton" /> </apex:pageBlockButtons> <apex:pageBlockTable value="{!OCRs}" style="table-layout:fixed" var="OCR"> <apex:column style="word-wrap: break-all;" headerValue="L0o0o0o0o0o 0o0o0o0o0o0o0o0o0 o0o0o0o0o0o0 o0o0o0o0o0o0o0o0 o0o0o0o0o0o0o0o0o0ng" > <apex:outputField style="word-wrap: break-word; white-space:normal" value="{!OCR.Attended_First_Meeting__c}"></apex:outputField> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page> 

2 Answers 2

0

Have you tried using headerClass on the <apex:column> element?

As per the docs for the style attribute:

The style used to display the column, used primarily for adding inline CSS styles. Note that this value does not apply to the header and footer cells.

1
  • In what way can we use “HeaderClass”? Commented Aug 2, 2021 at 15:25
0

None of the myriad of text wrapping related tags seemed to do anything at all - but this worked just fine:

<apex:column > <apex:facet name="header">Marketing<br/>Program<br/>Contact</apex:facet> <apex:outputField value="{!OCR.Marketing_Program_Contact__c}"></apex:outputField> </apex:column> 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.