Is there a way to put in multiple style classes? I want to take the btn class and add on a custom style class on my page called additionalStyle.


You just treat it just like a normal html class attribute and add multiple classes with a space in between...

Html Button:

<button class="style1 style2">Something</button>

Visualforce CommandButton:

<apex:commandButton styleClass="style1 style2" action="{!something}" value="Something" />

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.