+ Start a Discussion
Abhilash MAbhilash M 

how to display the fields at a equi distant from their labels

example
 name: {!.v.name}
address:{v.address}
phone:{v.phone}

output:

name:        bob
address​​​​​:    California
Phone:      ​852-895-7854

Please tell me your suggestions​
Vinoth Vijaya BaskerVinoth Vijaya Basker
Hello, 

Please try the below code sample, 
 
<apex:page standardController="Account" id="thePage"> 
<apex:form id="theForm"> 
  <apex:PanelGrid columns = "2">
      <apex:outputLabel value="Name" for="Name"/>
      <apex:outputField value="{!Account.Name}" id="Name"/>
       <apex:outputLabel value="Fax" for="Fax"/>
      <apex:outputField value="{!Account.Fax}" id="Fax"/>
       <apex:outputLabel value="Phone" for="Phone"/>
      <apex:outputField value="{!Account.Phone}" id="Phone"/>
          
  </apex:PanelGrid>
</apex:form> 
</apex:page>

Thanks,
Vinoth
Abhilash MAbhilash M
I want to display these in a lightning component....
 
Paul AllsoppPaul Allsopp
This is a design issue, so you'll want a design solution: overright the label min-width value in CSS and all labels will adhere to it. So if your form were called "myform", you could use: 
myform .mylabel {
    min-width: 180px !important;
}

then give your label: 
class="mylabel"