1

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
0

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

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

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

May this example help you....

<apex:page>
  <style>
        .myFormStyle {

            background-color: blue;
            background-image:url("img-Path") 
        }

    </style>

  <apex:form styleClass="myFormStyle">

       <!-- Tags -->

  </apex:form>
</apex:page>

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.