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
salesforce instancesalesforce instance 

how to align command link in center?

Hi all

i am trying to align my command link in center but its not working i have used all the css properties like align and float in my command link but still its not working

 

<apex:page standardController="Opportunity" extensions="oppcontrolleraugust">

 <apex:form >
  
  <apex:pageBlock title="Opportunity details"  id="pbb">
  <apex:pageblockButtons location="bottom">
  <apex:commandbutton value="Save & Addproduct" action="{!save}" />
 <!--<apex:commandbutton value="AddProduct" action="{!Product}" />-->
   </apex:pageblockButtons>
   <apex:pageblockSection title="Opportunity" columns="1">
    
  
<!----<apex:selectList id="locationLookupPicklist" value="{!accountid}" size="1" rendered="true" >  
<apex:selectOptions value="{!locationOptions}"/>  
</apex:selectList>---->    
      
     <apex:pageBlockSectionItem >   
      Account Name 
                <apex:actionRegion >
                <apex:inputText value="{!name1}" size="10" title="Keyword" >
                    <apex:actionSupport event="onkeyup"  action="{!search}" reRender="pnid"/>
                </apex:inputText>
                &nbsp;&nbsp;
                <apex:inputField value="{!opp.Accountid}" id="look" >
                 <apex:actionSupport event="onchange" reRender=""/>
                  </apex:inputField>
                
            <apex:outputPanel id="pnid">
            <apex:pageBlockTable value="{!allAccs}" var="a"  rendered="{!showtable}">
                <apex:column >
                    <apex:commandLink value="{!a.Name}" action="{!selectAcc}" reRender="pbb" >
                        <apex:param value="{!a.id}" name="{!a.Name}" assignTo="{!accId}"/>
                    </apex:commandLink>
                </apex:column>
            </apex:pageBlockTable>
            </apex:outputPanel>
            </apex:actionRegion>
            
   </apex:pageBlockSectionItem> 
 <apex:commandlink style="float:centre" value="Create New Account" action="{!acc}" />
 <apex:inputfield label="Contact" value="{!opp.Quotation_Contact__c}"/>
      
      <apex:inputfield value="{!opp.Name}"/>
      <!--<apex:inputfield value="{!opp.CurrencyIsoCode}"/>-->
      
   <!---   <apex:inputfield value="{!opp.Accountid}"/>  ---->
      
      <!--<apex:inputfield value="{!opp.Type}"/>-->
      <!--<apex:inputField value="{!opp.StageName}"/>-->
      </apex:pageblockSection><br/><br/><br/>
      </apex:pageblock>
      </apex:form>
      </apex:page>

hitesh90hitesh90
Hello,

Use padding instead of float.
<apex:commandlink style="padding-left:450px;" value="Create New Account" action="{!acc}" />

Thank You,
Hitesh Patel
Email :- hiteshpatel.aspl@gmail.com
http://mrjavascript.blogspot.in/