2

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.

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

1 Answer 1

2

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"/>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .