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
nani@rnani@r 

how to give a colour to field on every field in visual forcepage?

Jia HuJia Hu
Use standard Html Tab, such as Table, Tr, Td to define the format of your data on Visualforce page.

Then you can set the color of fields like HTML page.
Also you can use a CSS file to define the style of the whole page.

Suresh RaghuramSuresh Raghuram

try adding this to your field

 

<apex:outputpanel style="color: red"></apex:outputpanel>
if this answers your question make this as solution
nani@rnani@r

this is my code pls tell me how to give colour to name field box

 

 

 

<apex:page sidebar="false" standardController="student__c" extensions="student">
<apex:relatedList list="courses" />

<apex:relatedList list="students">
<apex:facet name="header">Titles can be overriden with facets</apex:facet>
</apex:relatedList>
<apex:image id="theImage" value="{!$Resource.tulips}" width="100" height="30"/>
<apex:sectionHeader description="student Edit" title="New student" help="http://www.google.co.in/" />

<apex:pageBlock >,<apex:form >

<center>

<apex:commandbutton value="save" action="{!save}"/>
<apex:commandButton value="save&new"/>
<apex:commandButton value="cancel"/>
</center>
</apex:form><b><b><b><b><b><b><apex:tabPanel >

<apex:tab label="home" onclick="home"><apex:form >

<apex:outputText >name</apex:outputText>
<apex:inputText value="{!name}"/><br/>
</apex:form></apex:tab>
<apex:tab label="Two">content for tab two</apex:tab>

</apex:tabPanel></b></b></b></b></b></b>
</apex:pageBlock>
<apex:pageBlock >,<apex:form >
<center>

<apex:commandButton value="save" action="{!save}"/>
<apex:commandButton value="save&new"/>
<apex:commandButton value="cancel"/>
</center>
</apex:form>
</apex:pageBlock>
<style>
*
{
background-color:white !important;
background-image:none !important;
color:black !important;
font-style:italic !important;
border:none!important;
}
</style>
</apex:page>