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
Anto HotelbedsAnto Hotelbeds 

line break in Visualforce Outputlabel

Hi, 

I have got this code in one of my visualforce pages: 

<apex:pageBlockSectionItem > 
<apex:outputLabel value="2. Does your system allow to change children ages during the booking process? (We do not allow it)" style="float: left;width:150px;"/> 
<apex:outputPanel > 
<apex:inputField value="{!Survey__c.System_allow_to_change_children_age__c}"> 
<apex:actionSupport event="onchange" rerender="Survey_Info" status="status"/> 
</apex:inputField> 
<apex:actionStatus id="status"/> 
</apex:outputPanel> 
</apex:pageBlockSectionItem> 

 

I want to show the long line "2. Does your system allow to change children ages during the booking process? (We do not allow it)" but the flag style is not working and I see everything in one line when I want to see it in two lines.(inserting a break line in the middle

Can you indicate me how to do it? 

Thanks, 

Antonio

Best Answer chosen by Admin (Salesforce Developers) 
Dhaval PanchalDhaval Panchal

Hi

 

instead of

 

<apex:outputLabel value="2. Does your system allow to change children ages during the booking process? (We do not allow it)" style="float: left;width:150px;"/>

 

try below

<apex:outputLabel escape="false" value="2. Does your system allow to change children ages during the booking process?<BR/> (We do not allow it)" style="float: left;width:150px;"/>

All Answers

Dhaval PanchalDhaval Panchal

Hi

 

instead of

 

<apex:outputLabel value="2. Does your system allow to change children ages during the booking process? (We do not allow it)" style="float: left;width:150px;"/>

 

try below

<apex:outputLabel escape="false" value="2. Does your system allow to change children ages during the booking process?<BR/> (We do not allow it)" style="float: left;width:150px;"/>

This was selected as the best answer
Anto HotelbedsAnto Hotelbeds
Thanks a lot depanchal!!