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
Dinesh KhandelwalDinesh Khandelwal 

How to width a column if table is inside page block > page block section > page block section item

My apex:pageBlockTable is inside pageblocksectionitem. and I am not able to specify the column width, can any one suggest the solution

<apex:page standardController="Batch_Job__c" extensions="AvailabilityCheckController" tabStyle="Line_Availability__c" cache="true">
  <apex:form id="avalForm">
    <apex:SectionHeader title="Line Availability Check"/>
    <apex:pageMessages showDetail="false"/>
    <apex:pageBlock id="avalPageBlock1">
      <apex:pageBlockButtons location="bottom">
        <apex:commandButton value="Submit File" action="{!processCSVFile}"/>
      </apex:pageBlockButtons>
      
      <apex:actionRegion >
      <apex:pageBlockSection title="Service Check Type" columns="1" collapsible="false" rendered="true" id="pageBlock1"> 
          <apex:selectRadio value="{!serviceCheckType}" >
            <apex:selectOption itemvalue="Line" itemLabel="Line Check"/> 
              <apex:selectOption itemvalue="Broadband" itemLabel="Broadband Check"/>
              <apex:selectOption itemvalue="Line&Broadband" itemLabel="Both Line & Broadband Checks"/>
              <apex:selectOption itemvalue="Broadband2" itemLabel="New Broadband Check" rendered="{!if($User.Email !='neil.jones@salesforce.com',false,true)}"/>
              <apex:actionSupport event="onchange" reRender="lineAvailabilityRequests" />
          </apex:selectRadio>
      </apex:pageBlockSection>  
      </apex:actionRegion>
      
      <apex:pageBlockSection title="Upload File" columns="1" id="pageBlock2"> 
        <apex:pageBlockSectionItem >
          <apex:inputFile value="{!attachment.body}" filename="{!attachment.name}" contentType="text/csv" accept="text/csv"/>
        </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:pageBlock id="avalPageBlock2">
      <apex:pageBlockButtons location="bottom">
        <apex:commandButton value="Submit Rows" action="{!submitRows}"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="Enter Details" id="lineAvailabilityRequests" columns="2"> 
        <apex:pageBlockSectionItem >
          <apex:pageBlockTable value="{!lineAvailabilityRequests}" var="lar"  columns="6" columnsWidth="10%,5%,5%,20%,30%,30%">
            <apex:column headerValue="Directory Number" >
              <apex:inputField value="{!lar.Directory_Number__c}" />
            </apex:column>
            <apex:column headerValue="Post Code" width="5%" style="width:5%">
              <apex:inputField value="{!lar.Post_Code__c}" />
            </apex:column>
            <apex:column headerValue="House No" rendered="{!serviceCheckType!='Line'}" width="5%" style="width:5%">
              <apex:inputField value="{!lar.House_No__c}" />
            </apex:column>
            <apex:column headerValue="House Name" rendered="{!serviceCheckType!='Line'}" width="20%">
              <apex:inputField value="{!lar.House_Name__c}"/>
            </apex:column>
            <apex:column headerValue="Street" rendered="{!serviceCheckType!='Line'}" width="30%">
              <apex:inputField value="{!lar.Street__c}"/>
            </apex:column>
            <apex:column headerValue="Town" rendered="{!serviceCheckType!='Line'}" width="30%">
              <apex:inputField value="{!lar.Town__c}"/>
            </apex:column>
          </apex:pageBlockTable>
        </apex:pageBlockSectionItem>
          </apex:pageBlockSection>
      <apex:pageBlockSection >
      <apex:pageBlockSectionItem > 
            <apex:inputText value="{!rowsToAdd}" size="1"/>
            <apex:commandButton value="Add Rows" action="{!addRows}"/>
         </apex:pageBlockSectionItem> 

        </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>


bob_buzzardbob_buzzard
You can specify the column widths, but these will be restricted based on the width of the containing pageblocksection etc.  Unfortunately there's no way to override the standard widths that the Salesforce stylesheets specify, at least not in a supported fashion.