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>
Best Answer
Have you tried using
headerClass
on the<apex:column>
element?As per the docs for the
style
attribute: