+ Start a Discussion
Tizian KirchmannTizian Kirchmann 

Styling in Visualforce

Hi everyone,

I created a visualforce page for our company.

There is e.g. this code snippet:
<apex:outputText value="Gesamtzeit" style="{!if(Rapport__c.Beginn2__c == NULL,'margin-top: 17px;','')}"/>

I want to achieve that the text value ("Gesamtzeit") gets moved downwards by 17px when the field value of field Beginn2__c is NULL and stay at the same place (do nothing) when its NOT NULL.

Somehow it doesnt do anything when I check the result even though there is no error or anything.

Am I doing anything wrong?

Raj VakatiRaj Vakati
try this
<apex:outputText value="Gesamtzeit" style="{!if(opp.StageName!='','', 'margin-top: 17px')}"/>