You need to sign in to do that
Don't have an account?
ArchieTechie6
CSS to include space/height/line-height between two <Apex:column> tags which are displayed as two rows
Hello All,
Below is my code to display details from an object. I am using "rendered" to render only when value is not null. This code works fine.
To show some spacing between rows, I am using <br/> after each outputText.
The problem is : If some value is null and its not rendered, still <br/> will be rendered and shows unwanted spacing between rows.
I have added a screenshot of the sample format of UI which I am trying to achieve.
<apex:dataTable value="{!Docs}" var="docs">
<apex:column >
<apex:outputText value="ID : {!docs.Id}" /><br /><br />
<apex:outputText value="Title : {!docs.Title}"/><br /><br />
<apex:outputText value="Article Body : {!docs.Body__c}"/> <br /><br />
<apex:outputText value="Article Number :{!docs.Number}"/> <br />
</apex:column>
</apex:dataTable>
What I want to do : I want to display space between rows, without using <br/>
Below is my code to display details from an object. I am using "rendered" to render only when value is not null. This code works fine.
To show some spacing between rows, I am using <br/> after each outputText.
The problem is : If some value is null and its not rendered, still <br/> will be rendered and shows unwanted spacing between rows.
I have added a screenshot of the sample format of UI which I am trying to achieve.
<apex:dataTable value="{!Docs}" var="docs">
<apex:column >
<apex:outputText value="ID : {!docs.Id}" /><br /><br />
<apex:outputText value="Title : {!docs.Title}"/><br /><br />
<apex:outputText value="Article Body : {!docs.Body__c}"/> <br /><br />
<apex:outputText value="Article Number :{!docs.Number}"/> <br />
</apex:column>
</apex:dataTable>
What I want to do : I want to display space between rows, without using <br/>
Follow the below code. I have written the code for the standard Object (Account). Change the Object and fields Accordingly. Hope it helps you!
Regards,
Akshay
All Answers
Follow the below code. I have written the code for the standard Object (Account). Change the Object and fields Accordingly. Hope it helps you!
Regards,
Akshay
<!-- The section is for Event Attendee -->
<apex:pageBlockSection columns="1"
rendered="{!Opportunity.Campaign.Acknowledgement_Type__c = 'Event Attendee'}" >
<apex:outputPanel>
<apex:outputText style="font-family: Arial Unicode MS;font-size:10pt; Line-Height: 10px;" value="Thank you for joining us on
{0,date,long} " >
<apex:param value="{!Opportunity.Closedate}"/>
</apex:outputText>
<apex:outputText style="font-family: Arial Unicode MS;font-size:10pt; Line-Height: 10px;" value=" at {!Opportunity.Campaign.Event_Location__c}
for {!Opportunity.Campaign.Name} hosted by {!Opportunity.Campaign.Hosted_By__r.Name}. We were thrilled you were able to
spend time with us and wanted to share with you some ways you can get involved with pur organization." >
</apex:outputText>
</apex:outputPanel>
<p style="font-family: Arial Unicode MS;font-size:10pt;Line-Height: 12px;" > Researchers estimate that only between 2 and 9 percent of all foster youth will blah blah....... a year. </p>
The Paragraphs print fine - it's just the OutputPanel lines that have too much space in between them. They are 1.5 lines apart, not single-spaced.
Thanks!
Sara