PDA

View Full Version : Small bit of code help


JJ the Fox
02-04-2008, 11:07 AM
<span style="color: <if condition="$post['reputation'] > 0">#008000<else />#FF0000</if>">
<div><strong> $vbphrase[reputation]: </strong>$post[reputation]</div></span>

So basically what that code does is display my reputation as:

Reputation: 2000

The whole thing is green but I only want the number to be green not 'Reputation:' which I'd like to be black.

Can someone lend a helping hand?

toonysnn
02-04-2008, 11:19 AM
If I understand correctly you wish it to be
Reputation: x
Correct?

<div><strong> $vbphrase[reputation]: </strong>
<span style="color: <if condition="$post['reputation'] > 0">#008000<else />#FF0000</if>">$post[reputation]</span>
</div>

JJ the Fox
02-04-2008, 12:37 PM
Perfect!

Thanks a lot.