You need to sign in to do that
Don't have an account?
Michael Clarke 16
How do you reduce white space in a vf page?
Created my first VF Page today.
How do I get rid of the white space that takes up half of the component in a Lightning page?
How do I get rid of the white space that takes up half of the component in a Lightning page?
You mean to say this space. kinldy share your VF page code and how you are pluging your page ..
Thanks
karthik
<apex:page standardController="Opportunity">
<!-- Retrieve specific fields for population in a Custom Highlights Panel on the Opportunity Record Page -->
<apex:pageBlock title="Opportunity Summary">
<apex:pageBlockTable value="{!Opportunity}" var="opp">
<apex:column title="Customer(s)"/>
<apex:column title="Guarantor(s)"/>
<apex:column title="Lender"/>
<apex:column title="Lender ID"/>
<apex:column title="Broker"/>
<apex:column title="Broker Code"/>
<apex:column title="Loan Amount"/>
<apex:column title="Close Date"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Opportunity}" var="opp1">
<apex:column value="{!opp1.Applicant_1__c}"/>
<apex:column title="Guarantor 1"/>
<apex:column value="{!opp1.Lender__c}"/>
<apex:column value="{!opp1.Account.Lender_ID__c}"/> <!-- Get Lender ID field on Account object -->
<apex:column value="{!opp1.Owner.Name}"/> <!-- Get name of Opportunity Owner -->
<apex:column value="{!opp1.Owner.AFG_Code__c}"/> <!-- Get AFG Code field on User object -->
<apex:column value="{!opp1.Amount}"/>
<apex:column value="{!opp1.CloseDate}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Opportunity}" var="opp2">
<apex:column value="{!opp2.Applicant_2__c}"/>
<apex:column title="Guarantor 2"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
<apex:page standardController="Opportunity">
<!-- Retrieve specific fields for population in a Custom Highlights Panel on the Opportunity Record Page -->
<apex:pageBlock title="Opportunity Summary">
<apex:pageBlockTable value="{!Opportunity}" var="opp">
<apex:column title="Customer(s)"/>
<apex:column title="Guarantor(s)"/>
<apex:column title="Lender"/>
<apex:column title="Lender ID"/>
<apex:column title="Broker"/>
<apex:column title="Broker Code"/>
<apex:column title="Loan Amount"/>
<apex:column title="Close Date"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Opportunity}" var="opp1">
<apex:column value="{!opp1.Applicant_1__c}"/>
<apex:column title="Guarantor 1"/>
<apex:column value="{!opp1.Lender__c}"/>
<apex:column value="{!opp1.Account.Lender_ID__c}"/> <!-- Get Lender ID field on Account object -->
<apex:column value="{!opp1.Owner.Name}"/> <!-- Get name of Opportunity Owner -->
<apex:column value="{!opp1.Owner.AFG_Code__c}"/> <!-- Get AFG Code field on User object -->
<apex:column value="{!opp1.Amount}"/>
<apex:column value="{!opp1.CloseDate}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Opportunity}" var="opp2">
<apex:column value="{!opp2.Applicant_2__c}"/>
<apex:column title="Guarantor 2"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
<apex:page lightningStylesheets="true" standardController="Opportunity">
<!-- Retrieve specific fields for population in a Custom Highlights Panel on the Opportunity Record Page -->
<apex:pageBlock title="Opportunity Summary">
<apex:pageBlockTable value="{!Opportunity}" var="opp1">
<apex:column headerValue="Customer(s)" value="{!opp1.Applicant_1__c}"/>
<apex:column headerValue="Guarantor(s)">Guarantor 1</apex:column>
<apex:column headerValue="Lender" value="{!opp1.Lender__c}"/>
<apex:column headerValue="Owner" value="{!opp1.Owner.Name}"/> <!-- Get name of Opportunity Owner -->
<apex:column value="{!opp1.Owner.AFG_Code__c}"/> <!-- Get AFG Code field on User object -->
<apex:column headerValue="Amount" value="{!opp1.Amount}"/>
<apex:column headerValue="Close Date" value="{!opp1.CloseDate}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Opportunity}" var="opp2">
<apex:column headerValue="" value="{!opp2.Applicant_2__c}"/>
<apex:column headerValue="">Guarantor 2</apex:column>
<apex:column headerValue="" value="{!opp2.Account.Lender_ID__c}"/> <!-- Get Lender ID field on Account object -->
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
to create a line without closing table.. i have modified your code use below to create line.
Hope this will helps you.
Thanks
karthik
Now to reduce the white space
Use rendered tage in pageblocktabe render it when its needed. so this way you can avoid extra space in vf page. in this below code you have to put your condition in rendered part in both table.
try it out.
Thanks
karthik