+ Start a Discussion
Gary PayneGary Payne 

How to widen a field label on a Visualforce page?

Can someone provide an example of the code needed to widen a text field label for SF1 mobile on a Visuaofrce page? Some of my field labels are lengthy and they are word wrapping to 3 - 4 rows in SF1 screens.  I'd like to widen the field label so the label takes up one row instead of word wrapping to 3-4 rows. Following is an example of the apex code I'm working with:

                <apex:PageBlockSectionItem >                
                    <apex:outputLabel value="Outsourced Collections - Case Study - Fairwinds" for="RFP_Request__c_OutsourcedCollectionsCaseStudyFairwinds__c"/>
                    <apex:outputField value="{!RFP_Request__c.OutsourcedCollectionsCaseStudyFairwinds__c}" id="RFP_Request__c_OutsourcedCollectionsCaseStudyFairwinds__c"/>                    
               </apex:PageBlockSectionItem> 

I'm not a developer yet and need some help on this.  
David ZhuDavid Zhu
I would suggest put the label and value in different line to avoid too many wrappings.
<apex:outputLabel value="Outsourced Collections - Case Study - Fairwinds" for="RFP_Request__c_OutsourcedCollectionsCaseStudyFairwinds__c"/><br/>
     <apex:outputText value="{!RFP_Request__c_OutsourcedCollectionsCaseStudyFairwinds__c}" id= 
"RFP_Request__c_OutsourcedCollectionsCaseStudyFairwinds__c"/><br/>
Based on SFDC, you may not want to use PageBlockSeectionItem for SF1.
https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/vf_dev_best_practices_components_to_avoid.htm