function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dndn 

Field Alignment for inserted Visualforce Page

Hello,

 

I'm using an extension controller to display a calcluated field. After I insert my custom Visualforce page into an existing page layout, the page I inserted is centered, hence, the field (Service TIme) I inserted is not aligned with the rest of the fields in the page.

 

Here is my Visualforce page:

 

<apex:page standardController="BMCServiceDesk__Incident__c"  extensions="AT_IncidentExtension" tabStyle="BMCServiceDesk__Incident__c">
	<apex:pageBlock mode="maindetail">
		<apex:pageBlockSection Columns="2" collapsible="true">
			<apex:pageBlockSectionItem >
				<apex:outputLabel value="Service Time" for="ST"/>
				<apex:outputText value="{!serviceTime}" id="ST"/>			
			</apex:pageBlockSectionItem>			
		</apex:pageBlockSection>
	</apex:pageBlock>
	<apex:outputText value="{!BMCServiceDesk__Incident__c.BMCServiceDesk__openDateTime__c}" rendered="false"/>
	<apex:outputText value="{!BMCServiceDesk__Incident__c.BMCServiceDesk__closeDateTime__c}" rendered="false"/>
</apex:page>

 

Even though I specify 100% for the width parameter while inserting the Visualforce page into the page layout, it appears to be shorter in width and centered.  Here is how it renders:

 

<sorry couldn't paste the graphic>

 

Obvously, I'm new to this and I'd truly appreciate any help anyone can provide to fix this so all the fileds in the page (original page layout + new Visualforce page) align up.

 

Thanks,

DN

dndn

I still can't figure out why my first column is shifted right by a few characters while my second column aligns just fine with the rest of the columns in the page. Here's my updated page:

 

<apex:page standardController="BMCServiceDesk__Incident__c"  extensions="AT_IncidentExtensionController">
<apex:pageBlock mode="detail">
<apex:pageBlockSection collapsible="true" columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Service Time" for="ST1"/>
<apex:outputText value="{!serviceTime}" id="ST1"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Elapsed Time" for="ST2"/>
<apex:outputText value="{!elapsedTime}" id="ST2"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:outputText value="{!BMCServiceDesk__Incident__c.BMCServiceDesk__openDateTime__c}" rendered="false"/>
<apex:outputText value="{!BMCServiceDesk__Incident__c.BMCServiceDesk__closeDateTime__c}" rendered="false"/>
<apex:outputText value="{!BMCServiceDesk__Incident__c.AT_Service_Exclude_Time__c}" rendered="false"/>
</apex:page>

 

Please help.

 

DN