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
rajjjjrajjjj 

fixing column width in output panel

HI All,

  I am trying to divide an output panel into 2 equal halfs while dynamic page refresh on clicking button.But the second half is taking more width than first half.Does anyone faced this problem of fixing the width into equal size.

Can anyone suggest an idea?

Navatar_DbSupNavatar_DbSup

Hi,

Try the below code snippet as reference:

 

<apex:page >

<Apex:form >

 <apex:pageBlock >

 <div style="witdh:100%">

 <div style="width:50%; float:left; posititon:relative">

    <apex:pageBlockSection title="section first" >

<apex:pageBlockSectionItem >

<apex:outputLabel >Name</apex:outputLabel>

<apex:inputText />

</apex:pageBlockSectionItem>

   

   

    </apex:pageBlockSection>

    </div>

     <div  style="width:50%; float:right; posititon:relative">

    <apex:pageBlockSection title="section 2" >

<apex:pageBlockSectionItem >

<apex:outputLabel >Name</apex:outputLabel>

<apex:inputText />

</apex:pageBlockSectionItem>

   

   

    </apex:pageBlockSection>

    </div>

    </div>

 </apex:pageBlock>

</Apex:form>

</apex:page>

 

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

 

cmd loadercmd loader

Hi,

 

I have also facing same issue. Are you find any solution.

 

Thanks

rajjjjrajjjj

Hi Ankit,

  Here is my code. I want to repeat those 2 fields on left and when clicking on ri8.

  Again left and ri8,....

  But on first click its coming good....when i click on second time....the right part is occupying more space and left part is shrinking to left  little bit. I want to fix both of them to equal width.

 

I have tried everything....style,styleclass,div...but its not working.

 

<apex:page standardController="Account">
	<apex:form >
	<apex:pageBlock >
		<apex:pageBlockButton>
			<apex:commandButton value="dagas" rerender="outputpanel1">
			</apex:commandButton>
		</apex:pageBlockButton>
	
		<apex:outputPanel id="outputpanel1">
		<apex:pageBlockSection title="section first" columns="2">
		
		<apex:repeat>
		<apex:pageBlockSectionItem >
			<apex:outputLabel >Account Name</apex:outputLabel>
			<apex:inputText />
		</apex:pageBlockSectionItem>
		
		<apex:pageBlockSectionItem >
			<apex:outputLabel >Account Number</apex:outputLabel>
			<apex:inputText />
		</apex:pageBlockSectionItem>
		</apex:repeat>
		
	</apex:pageBlockSection>
	</apex:outputPanel>
	
	</apex:pageBlock >
	<apex:form >   
</apex:page>

 Thanks,

  Rajjj.