You need to sign in to do that
Don't have an account?
Ashwin Gadiyar
How can I move my field left in Visualforce?
I want to move my field to the left in visualforce. The code is as follows:
<apex:pageblockSection columns="1" >
<apex:outputField value="{!Opportunity.Why_do_anything__c}" style="float:left,width:100% important;" />
</apex:pageblockSection>
I've tried putting style="float:left" without any success. I've heard it can't be controlled when in a pageblockSection though.
<apex:pageblockSection columns="1" >
<apex:outputField value="{!Opportunity.Why_do_anything__c}" style="float:left,width:100% important;" />
</apex:pageblockSection>
I've tried putting style="float:left" without any success. I've heard it can't be controlled when in a pageblockSection though.
Try the code below:
Hope this helps ! Mark as solved if it did.
Thanks,
Sarvani
All Answers
Use Padding-right property to move your field to left of the screen or page. Add sufficient value.Below is an example snippet you can follow to fix your field.
Mark this as best answer if it solves your issue.Others can benefit too.
Hope this helps!
Regards,
Santosh.
Thanks for your answer. My only issue with this is that using px can cause it to look differently on different sized screens etc?
instead of px; you can simply use % example padding-right:20%. This will solve your issue.
Try the code below:
Hope this helps ! Mark as solved if it did.
Thanks,
Sarvani
@Sarvani, thank you - it did work. However there is more code on the page that has 2-column blocks as below, which it has also changed:
<apex:pageBlockSection title="Company Information" columns="2">
<apex:outputField value="{!Opportunity.Employees__c}" />
<apex:outputField value="{!Opportunity.Buying_Location__c}" />
<apex:outputField value="{!Opportunity.Industry__c}" />
<apex:outputfield value="{!Opportunity.Renewal_Date__c}"/>
<apex:outputfield value="{!Opportunity.Website__c}"/>
<apex:outputField value="{!Opportunity.Turnover__c}"/>
</apex:pageBlockSection>
Is there a way that the code provided by Sarvani only is to affect the one column sections? I would like the pageBlockSection that has 2 columns to not be aligned left