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

limiting the size of pageblock

Hii ,
            can i define the width of <apex:pageBlock> manually ? I am able to define the size of <apex:pageBlockTable> but not of pageBlock .
      Normally <pageBlock > take full width of page but i want to override it. so if possible then please tell me .

Hi, Rishav. You can't define the width of a pageBlock, but you could define the width of a panelGrid (|StartTopic=Content%2Fpages_compref_panelGrid.htm|SkinName=webhelp" target="_blank) within a pageblock.
You cannot write style property on pageblock.
What you have to do is to override the css of salesforce for pageblock like the following

You can apply CSS to Pageblock like following:

.pbHeader {

   //put your custom css here