You need to sign in to do that
Don't have an account?
can't align elements within pageBlockSection
I'm building a form in VisualForce, and I can't get the elements of a pageBlockSection to line up. Here's my problem: the dropdown label is not in bold, it is not aligned horizontally with the dropdown, and neither label nor dropdown is aligned with the inputFields below it.
How can I get these to align? It seems I would have to group the label and dropdown somehow.
Here's my visualforce code:
<apex:pageBlockSection title="Account Information" columns="1">
<apex:outputLabel value="Record Type" for="AccountRT"/>
<apex:selectList id="AccountRT" value="{!theAccountRecordTypeID}">
<apex:selectOptions value="{!theAccountRecordTypeOptions}"/>
</apex:selectList>
<apex:inputField value="{!theAccount.name}"/>
</apex:pageBlockSection>
All Answers
Hi Shikibu,
I'm having the exact same problem as you did. Can you please show me what you mean by "wrap anything other than an inputField in a pageBlockSectionItem"? I've been searching all of the doc and on the internet. I'm not having any luck. I would really appreciate your help. Thank you in advance.
Best,
Ta
<apex:pageBlockSection columns="2"> <apex:pageBlockSectionItem > <apex:outputLabel value="Account Name" for="the_account"/> <apex:outputLink value="/{!theAccount.Id}" id="the_account"> <apex:outputText value="{!theAccount.Name}"/> </apex:outputLink> </apex:pageBlockSectionItem> </apex:pageBlockSection>
Hi Shikibu,
Thank you very much for the example.
Best,
Ta
@Shikibu
Thanks a lot..