1

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

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

2 Answers 2

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>
1
  • Its working fine, ThankYou Saroj Bera
    – Magi102
    Commented Jul 10, 2015 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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .