You need to sign in to do that
Don't have an account?

at beginning of every row in <apex:outputField>
Hi guys,
I created a visualforce page which displays the content of a field called 'Description'. This field can be several rows long and I want to add a whitespace with at the beginning of every row.
At the moment it looks like that:
But obviously I will only have a whitespace in the first row and not in the following ones. So how do I ensure that at the beginning of every row, there is a whitespace before the text begins?
Thanks for your help.
I created a visualforce page which displays the content of a field called 'Description'. This field can be several rows long and I want to add a whitespace with at the beginning of every row.
At the moment it looks like that:
<apex:outputField value="{!Rapport__c.Description__c}"/>
But obviously I will only have a whitespace in the first row and not in the following ones. So how do I ensure that at the beginning of every row, there is a whitespace before the text begins?
Thanks for your help.
You can try below code.
https://sfdcfanboy.com/2017/08/26/a-tip-a-day-8-display-line-breaks-of-long-text-area-in-vf-page/
Best Regards,
Sandhya
thanks for your answer. Sadly this does not work, I just tested it.
It doesnt not create any white spaces.
You can use this code, according to your req you can change the px.
<apex:outputField value="{!Rapport__c.Description__c}" style="margin-right:3px;" />
thanks for the advice. It actually worked. But there is another problem now.
When I enter a text in the description field like this:
It gets displayed like this:
Isnt there any possibility to get a new line after pressing "return/enter" on the keyboard?
And went to my static resource pdfStyle2 and added there:
Now it does do the line break and the white space :)
Thanks!
Use this