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
JasiJasi 

fields in the center of the page

I created a vf page, but I want label of the checkboxes to the right of the field value. I am using apex:inputfield for these checkboxes and these are fields in salesforce. 

 

Also is there a way to get a pageblocksection to the center of the page? 

 

Please help. 

 

Thanks,

 

Best Answer chosen by Admin (Salesforce Developers) 
Avidev9Avidev9

I am not sure this will work or not
enclose the pageblock in a div and style class to the label. Label uses "labelCol" class you can modify that according to need

 

<style>
#myDiv .labelCol{float:right}
</style>
<div id="myDiv">
    <apex:pageblock>
     //ur code here
    </apex:pageBlock>
</div>

 

All Answers

Avidev9Avidev9

I am not sure this will work or not
enclose the pageblock in a div and style class to the label. Label uses "labelCol" class you can modify that according to need

 

<style>
#myDiv .labelCol{float:right}
</style>
<div id="myDiv">
    <apex:pageblock>
     //ur code here
    </apex:pageBlock>
</div>

 

This was selected as the best answer
JasiJasi

Thanks Avi. You just introduced me to the <style> component in VF. now I am getting the label coming in two lines. Wanted to know how to increase the width of one cell and stuff...is there a place I can look at to learn more about style??

 

Thanks again..!