StyleClass does not work with apex:commandButton Salesforce ?
Below is the code for CSS to change button styles
<apex:page >
<style type="text/css">
.myClass {
color:white;
background-color:#00CC00;
}
</style>
<apex:commandButton styleClass="myClass" value="Save" action="{!someAction}">
</apex:page>
<style type="text/css">
.myClass {
color:white;
background-color:#00CC00;
}
</style>
<apex:commandButton styleClass="myClass" value="Save" action="{!someAction}">
</apex:page>
If above CSS is not reflecting to your button then change the CSS by adding Important to CSS
like below
like below
<style type="text/css">.myClass{color:white !important;background:#00CC00 !important;}</style>
Coool :)
ReplyDelete