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
Force.platformForce.platform 

can we reduce width of pageBlock and pageBlockSection

how to reduce width of pageBlock and pageBlockSection on vf page
Suraj TripathiSuraj Tripathi
Hi Arati,

Yes, We can reduce width of pageBlock and pageBlockSection
just giv <div></div> tag inside respective pageBlock or pageBlockSection like this:
 
<apex:pageBlock  title="abcd"> <div id="InnternalDiv" style="height:600px;width:600px;"> </div>
</apexpageBlock>


I hope this will be helpful for you, if it helps you, please marks this as best answer.

Regards
Suraj​
 
sfdcMonkey.comsfdcMonkey.com
Hi Arati Chirame,
here is the sample code :

<!-- Page: -->
<apex:page standardController="Account">
    <style>
  /*for page block */     
.bPageBlock{
        width : 50%;
        }
        
        /*for page block section*/
       .pbSubheader {
          width : 40%
        }
    </style>

    <apex:form>
        <apex:pageBlock title="My Contenta sdasd asd asd asd sadas d" mode="edit">
            <apex:pageBlockButtons>
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="My Content Section asd asd " columns="2">
                <apex:inputField value="{!account.name}"/>
                <apex:inputField value="{!account.site}"/>
                <apex:inputField value="{!account.type}"/>
                <apex:inputField value="{!account.accountNumber}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Let us know if it helps you, and kindly mark it best answer it this answer helps you so it make proper solution for others in future
thanks
sfdcMonkey.comsfdcMonkey.com
let us know if it helps you, and closed your query with choosing best answer so it make proper solution for others in future