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
HoysalaHoysala 

how to change color of the button in vf page

Khan AnasKhan Anas (Salesforce Developers) 
Hi Suraj,

Greetings to you!

Below is the sample code which I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
 
<apex:page >    
    
    <style type="text/css">
        .myClass{
        color:white !important;
        background:#00CC00 !important;
        }
    </style>
    
    <apex:form> 
        <apex:commandButton value="Edit" styleClass="myClass" />
    </apex:form>
</apex:page>

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas