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

Right-aligning a field on a Visualforce page
Hello,
I wonder if anyone can help please? My knowledge of Apex is extremely limited. In our Salesforce we have a Visualforce page that places text at the top of the Opportunity page. In this order: Stage ¦ Grant Amount/Paid Amount ¦ Decision Date - it works fine except the text on the right hand side (Decision Date) sometimes is 'pushed down' to a new line on the left side of the page. Is there away of 'right aligning' this field so that it is always right-aligned on the same line as the other fields? The code is below.
Many thanks, Rob
<apex:page standardController="Opportunity"> <script> function reload(){ window.setTimeout('window.location.reload(true);',5); } </script> <div> <span style="color:#a52a2a;font-size:125%;font-weight:bold;padding-left:42px;"> <apex:outputField value=" {!opportunity.StageName}"/></span> <span style="color:#2a2aa5;text-align:center;font-size:125%;font-weight:bold;padding-left:30%;padding-right:30%;">Grant: <apex:outputField value=" {!opportunity.Grant_Amount__c}"/> / Paid <apex:outputField value=" {!opportunity.Total_Paid__c}"/></span> <span style="color:#259125;text-align:left;font-size:125%;font-weight:bold;padding-left:42px;"> <apex:outputField value="{!opportunity.Charity__c}"/></span> </div> <apex:detail subject="{!Opportunity.Id}" relatedList="true" title="true" inlineEdit="true" oncomplete="reload()"/> </apex:page>
I wonder if anyone can help please? My knowledge of Apex is extremely limited. In our Salesforce we have a Visualforce page that places text at the top of the Opportunity page. In this order: Stage ¦ Grant Amount/Paid Amount ¦ Decision Date - it works fine except the text on the right hand side (Decision Date) sometimes is 'pushed down' to a new line on the left side of the page. Is there away of 'right aligning' this field so that it is always right-aligned on the same line as the other fields? The code is below.
Many thanks, Rob
<apex:page standardController="Opportunity"> <script> function reload(){ window.setTimeout('window.location.reload(true);',5); } </script> <div> <span style="color:#a52a2a;font-size:125%;font-weight:bold;padding-left:42px;"> <apex:outputField value=" {!opportunity.StageName}"/></span> <span style="color:#2a2aa5;text-align:center;font-size:125%;font-weight:bold;padding-left:30%;padding-right:30%;">Grant: <apex:outputField value=" {!opportunity.Grant_Amount__c}"/> / Paid <apex:outputField value=" {!opportunity.Total_Paid__c}"/></span> <span style="color:#259125;text-align:left;font-size:125%;font-weight:bold;padding-left:42px;"> <apex:outputField value="{!opportunity.Charity__c}"/></span> </div> <apex:detail subject="{!Opportunity.Id}" relatedList="true" title="true" inlineEdit="true" oncomplete="reload()"/> </apex:page>
I would like (all on the same line):
I hope this is clearer, best wishes, Rob