[SalesForce] problem aligning pageBlockSectionItem

I have been trying to align a pageBlockSectionItem (see image below).

enter image description here

I added the class "dataCol" and it correctly formatted the text, but I can't seem to get the bottom right column to align properly.

Here is my VF pageblock code:

    <apex:pageBlock title="Filtering Options" mode="edit" id="thePageBlock">
        <apex:pageMessages />
        <apex:pageBlockButtons location="bottom" id="theButtons">
            <apex:commandButton value="Filter Calendar" action="{!pageLoad}" id="theFilterButton" />
            <apex:commandButton value="Clear Filters" reRender="theForm" />
        </apex:pageBlockButtons>
        <apex:pageBlockSection id="theSection">
            <apex:pageBlockSectionItem id="regionItem">
                <apex:outputLabel for="regionFilter">Work Order Region</apex:outputLabel>
                <apex:selectList id="regionFilter" value="{!region}" size="1">
                    <apex:selectOptions value="{!regions}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="workOrderTypeItem">
                <apex:outputLabel for="workOrderTypeFilter">Work Order Type</apex:outputLabel>
                <apex:selectList id="workOrderTypeFilter" value="{!workOrderType}" size="1">
                    <apex:selectOptions value="{!workOrderTypes}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="siteVisitStatusItem" >
                <apex:outputLabel for="siteVisitStatusFilter">Site Visit Status</apex:outputLabel>
                <apex:selectList id="siteVisitStatusFilter" value="{!status}" size="1">
                    <apex:selectOptions value="{!siteVisitStatuses}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="assignedEmployeeItem">
                <apex:outputLabel for="assignedEmployeeFilter">Assigned Employee</apex:outputLabel>
                <apex:selectList id="assignedEmployeeFilter" value="{!assignedEmployee}" size="1">
                    <apex:selectOptions value="{!assignedEmployees}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem id="packItem">
                <apex:outputLabel for="packFilter">Pack</apex:outputLabel>
                <apex:selectList id="packFilter" value="{!pack}" size="1">
                    <apex:selectOptions value="{!packs}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputPanel >
                    <apex:outputText value="Work Order Number" styleClass="labelCol vfLabelColTextWrap" />
                    <apex:inputHidden value="{!workOrderId}" id="workOrderId" />
                    <apex:inputText id="workOrderNumber" onFocus="this.blur()" disabled="false" style="width:175px;" />
                    <a href="#" onclick="openWorkOrderLookupPopup('{!$Component.workOrderNumber}', '{!$Component.workOrderId}'); return false"><img onmouseover="this.className = 'lookupIconOn';this.className = 'lookupIconOn';" onmouseout="this.className = 'lookupIcon';this.className = 'lookupIcon';" onfocus="this.className = 'lookupIconOn';" onblur="this.className = 'lookupIcon';" class="lookupIcon" src="/s.gif" id="lookupIcon" /></a>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
    </apex:pageBlock>

Thanks for any help.

Best Answer

Try this:

<apex:pageBlockSectionItem >
  <apex:outputText value="Work Order Number" styleClass="labelCol vfLabelColTextWrap" />
  <apex:outputPanel >
    <apex:inputHidden value="{!workOrderId}" id="workOrderId" />
    <apex:inputText id="workOrderNumber" onFocus="this.blur()" disabled="false" style="width:175px;" />
    <a href="#" onclick="openWorkOrderLookupPopup('{!$Component.workOrderNumber}', '{!$Component.workOrderId}'); return false"><img onmouseover="this.className = 'lookupIconOn';this.className = 'lookupIconOn';" onmouseout="this.className = 'lookupIcon';this.className = 'lookupIcon';" onfocus="this.className = 'lookupIconOn';" onblur="this.className = 'lookupIcon';" class="lookupIcon" src="/s.gif" id="lookupIcon" /></a>
  </apex:outputPanel>
</apex:pageBlockSectionItem>
Related Topic