1

I would like a command link to look like a command button. I was once told that I could to that with using the style.

  • You should probably describe this better - are you using this in Visualforce? – dzh Jan 20 '18 at 1:27
1

For Lightning you can use following styleClass attribute:

styleClass="slds-m-top_xx-small slds-button slds-button_neutral btnSubmit"

i.e.,

<apex:commandLink 
    target="_top" 
    styleClass="slds-m-top_xx-small slds-button slds-button_neutral btnSubmit" 
    style="margin:0 auto;" 
    action="{!URLFOR($Action.Acount.View, $CurrentPage.Parameters.Id)}" 
    value="Back"/>


For Classic you can use following styleClass attribute:

styleClass="btn"

i.e.,

<apex:commandLink 
    target="_top" 
    styleClass="btn" 
    style="margin:0 auto;" 
    action="{!URLFOR($Action.Account.View, $CurrentPage.Parameters.Id)}" 
    value="Back"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.