Customize questions display

To customize the questions display you have to open up questions.php (or index.php if you changed the file’s name).

Find this code:

<p>
<span class=”question”>
<?php
if ($namefield == ‘yes’ && !empty($name))
echo $name.’ asked: ‘.$question;
else
echo $question;
?>
</span><br>
<span class=”answer”><?php echo nl2br($answer); ?></span><br>
<span class=”dates”>Asked: <?php echo date($timestamp, strtotime($dateask)); ?> | Answered: <?php echo date($timestamp, strtotime($dateanswer)); ?></span>
</p>

To customize this, I create some div classes in my style.css file:

/*BellaBuzz*/
.questionblock{
border-radius:15px;
background-image: url(‘images/questions.jpg’);
color:#ffeec0;
width:670px;
padding:10px;
margin-bottom:20px;
font:300 15px/20px ‘PT Sans’, serif;
text-align:center;
}

.thequestion{
font:700 15px/20px ‘PT Sans’, serif;
border-bottom:1px solid #ffeec0;
text-align:center;
margin-bottom:5px;
}

.thedate{font-style:italic;
margin-top:15px;}

Of course you can customize it as you want. This is how the php code looks like:

<div class=”questionblock”>
<div class=”thequestion”>
<?php
if ($namefield == ‘yes’ && !empty($name))
echo $name.’ asked: ‘.$question;
else
echo $question;
?>
</div>
<?php echo nl2br($answer); ?>
<div class=”thedate”>
Asked: <?php echo date($timestamp, strtotime($dateask)); ?> | Answered: <?php echo date($timestamp, strtotime($dateanswer)); ?>
</div>

</div>

You can style the questions display as you like. This is how mine looks like: