+ Start a Discussion
Faizan Ali 17Faizan Ali 17 

Colour not changing / no errors in code

Any reason why my code is not displaying the colour?

I want the colour to appear red when it is an appointment and yellow if it is a diary booking:

Here is my code:

Best Answer chosen by Faizan Ali 17

Hi Faizan, 

You're using styleClass in <td>, which won't work since it's a visualforce attribute.

Just change styleClass to class as below, and it will work

<td class="{IF(value == 'Appointment', 'appClass', 'diaryClass')}" >

Hope this helps!