Iam using Standard controller in visualforce page. How to set the background colour or image. Please Give me Example

  • Background color of which part you want to change? Please explain. – Saroj Bera Jul 10 '15 at 12:58
  • Hi Saroj Bera, I Want to put back of input field values – Magi102 Jul 10 '15 at 13:01
  • Please check my answer below. – Saroj Bera Jul 10 '15 at 13:28

Here is an example, how you can change the background colors of the input fields. Hope this will help.

<apex:page standardcontroller="Contact">
input[type=text] {
    width: 150px;
    display: block;
    margin-bottom: 10px;
    background-color: yellow;

 <apex:form >
   <apex:pageBlock title="Contact Create/Edit">
      <apex:pageBlockSection title="Contact Information">
       <apex:inputField value="{!contact.FirstName}"/>
  • Its working fine, ThankYou Saroj Bera – Magi102 Jul 10 '15 at 13:42

May this example help you....

        .myFormStyle {

            background-color: blue;


  <apex:form styleClass="myFormStyle">

       <!-- Tags -->


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.