PDA

View Full Version : Conditional postbit change not working


mathforum
10-27-2013, 06:31 AM
Hi everyone. I want to change the background color of the userinfo container for postbit legacy. I wrote the following conditional statement:

<vb:if condition="$thread['postuserid'] == $post['userid'] && $thread['firstpostid'] != $post['postid']">
<div class ="userinfo" style = "background:white">
<else />
<div class="userinfo" style = "#F2F6F8">
</vb:if>

The two conditions are correct I believe, it's the div stuff that is off. I can override the background color if I just write <div class ="userinfo" style = "background:white"> but once I add these two situations to the mix the whole postbit is unreadable.

Help! Any ideas?

--------------- Added 1382856881 at 1382856881 ---------------

Got it.

<vb:if condition="$thread['postuserid'] == $post['userid'] && $thread['firstpostid'] != $post['postid']">
<div class ="userinfo" style = "background:white">
<vb:else />
<div class="userinfo" style = "#F2F6F8">
</vb:if>