+ Start a Discussion
benwrigleybenwrigley 

trouble seeing apex:messages style

I'm sorry for such a stupid question but I'm at a complete loss.

 

Any idea why this doesn't work:

 

 

<apex:messages style="font-color:red;"/>

 


<apex:messages style="font-color:red;"/>

 

I get the messages, but no color :(

Pradeep_NavatarPradeep_Navatar

Best way is to define style class first.

 

Try out the sample code given below :

 

           <style>

             .locationError { color: red; font-weight: strong;}

           </style>

            <apex:messages styleClass="locationError" /> <p />

           // with styleclass

            <apex:outputText value="Styled Text in a sample style class" styleClass="locationError"/>

           // without styleclass

            <apex:outputText value="Styled Text in a sample style class" style="color:blue;font-style:italic"/> <p />

 

Dont use color in style as style="font-color:red;". Modify your code like style="color:blue"

 

Did this answer your question? if so, please mark it solved.

SSRS2SSRS2

use

<apex:messages style="color:red;"/>

 

-Suresh

JeeedeeeJeeedeee

Use below to have the exact same color as normal error messages (dark red)

 

 

<apex:messages styleClass="errorMsg"/>