+ Start a Discussion
sfdc@isha.ax1814sfdc@isha.ax1814 

vfpage alignment issue- urgent help

Hi evryone. please find the below screenshot  and below code for  fields alignments and help me with the alignment.

User-added image

<apex:actionStatus onstart="blockPageLoading()" onstop="unblockPage()" id="blockUI"/>
        <apex:actionFunction name="recalPage" action="{!recalculatePage}"  rerender="procedureComponent,pagemessage"/>
        
        <apex:pageBlock mode="edit" tabStyle="event">
            <div style="margin-left: 300px;"><b><font color ="red"><apex:messages /></font></b></div>
            <br />
           
                <apex:pageBlockSection collapsible="false" columns="1" title="Details of calendar">  
                                
                <apex:inputfield value="{!eventDetails.Subject}"/> 
                <apex:inputfield value="{!eventDetails.Ownerid}"/>
                <apex:inputfield value="{!eventDetails.Internal_Organization__c}" onchange="recalPage();"/>
                <apex:inputfield value="{!eventDetails.Whatid}"/>
                <apex:inputfield value="{!eventDetails.Type__c}" onchange="recalPage();" />
                <apex:inputfield value="{!eventDetails.SubType__c}" onchange="recalPage();" />
                <apex:inputfield value="{!eventDetails.IsAllDayEvent}"/>                
                <apex:pageBlockSectionItem id="debut" >
                <apex:outputLabel value="Start Date Time" for="debut" />
                <apex:outputPanel >
                    <apex:inputText value="{!startDate}" id="dateField"  style="width:80px; height:20px;" required="true"/>
                    <apex:inputText value="{!startHour}" id="startDateHour" style="width:75px; height:20px;" />
                    [&nbsp;<a id="sethour" style="text-decoration: underline; cursor:pointer;" >{!CurrentstartHour}</a>&nbsp;]
                    </apex:outputPanel>                 
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem id="fin" >
                <apex:outputLabel value="End Date Time" for="fin"/>
                <apex:outputPanel >
                    <apex:inputText value="{!endDate}" id="enddate" style="width:80px; height:20px;" required="true"/>
                    <apex:inputText value="{!endHour}" id="endDateHour" style="width:75px; height:20px;" />
                    [&nbsp;<a id="setendHour" style="text-decoration: underline; cursor:pointer;" >{!CurrentstartHour}</a>&nbsp;]
                </apex:outputPanel> 
                </apex:pageBlockSectionItem>                
            </apex:pageBlockSection>
             
            
           <apex:pageblockSection columns="1" >
               <apex:repeat value="{!eventFieldSet}" var="field">    
                <!--<apex:datatable value="{!eventFieldSet}" var="field">-->
                    <apex:pageBlockSectionItem >
                                       
                    <apex:outputPanel rendered="{!field.Label = 'Type' || field.Label = 'Internal Organization' || field.label = 'Sub-Type'}">
                  
                           {!field.Label} &nbsp;&nbsp;
                            <apex:inputField value="{!eventDetails[field]}" onchange="recalPage();"/><br/>
                            
                   </apex:outputPanel>
                   
                   <apex:outputPanel rendered="{! !(field.Label = 'Type')}">
                           {!field.Label} &nbsp;&nbsp;
                           <apex:inputField value="{!eventDetails[field]}"/><br/>
                   </apex:outputPanel>
                   
                </apex:pageBlockSectionItem>
                </apex:repeat>
        <!--</apex:datatable>-->
        </apex:pageblocksection>
        
           </apex:pageblock>


regards,
Isha
Best Answer chosen by sfdc@isha.ax1814
Tarun Khatri (TK)Tarun Khatri (TK)
Hello Isha,

Try below code under your second pageblocksection:
 
<apex:pageblockSection columns="1" >
	  <apex:repeat value="{!eventFieldSet}" var="field">    
		<!--<apex:datatable value="{!eventFieldSet}" var="field">-->
		<apex:pageBlockSectionItem rendered="{!field.Label = 'Type' || field.Label = 'Internal Organization' || field.label = 'Sub-Type'}">
			<apex:outputLabel> {!field.Label} </apex:outputLabel>
			<apex:outputPanel >		  
					<apex:inputField value="{!eventDetails[field]}" onchange="recalPage();"/><br/>					
		   </apex:outputPanel>
		</apex:pageBlockSectionItem>
		<apex:pageBlockSectionItem rendered="{! !(field.Label = 'Type')}"> 		
			<apex:outputLabel> {!field.Label} </apex:outputLabel>
		   <apex:outputPanel >				   
				   <apex:inputField value="{!eventDetails[field]}"/><br/>
		   </apex:outputPanel>		   
		</apex:pageBlockSectionItem>
	</apex:repeat>
<!--</apex:datatable>-->
</apex:pageblocksection>

-Thanks,
TK

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.