HTML and CSS Reference
In-Depth Information
Adding the Answer Form View
Create a new file called
question-answer.inc.php
and save it in
system/views/
with the following markup inside:
<form method="post" class="answer"
action="
<?php echo $form_action; ?>
">
<input type="submit" value="Answer this question." />
<input type="hidden" name="question_id"
value="
<?php echo $question_id; ?>
" />
<input type="hidden" name="room_id"
value="
<?php echo $room_id; ?>
" />
<input type="hidden" name="nonce"
value="
<?php echo $nonce; ?>
" />
</form>
This markup uses the variables set in
output_answer_form()
to generate the markup for presenters to mark
a question as answered.
Adding Styles for Voted and Answered Questions
Because a question that has been voted up or answered is no longer interactive, the buttons should no longer appear
clickable. Open
assets/styles/main.css
and insert the following CSS just above the media queries:
/* Voted and answered styles
----------------------------------------------------------------------------*/
#questions .voted .vote input {
background-position: left bottom;
width: 78px;
cursor: initial;
}
#questions .answered .answer input:active,
#questions .answered .answer input:hover,
#questions .answered .answer input:focus {
background-position: right top;
cursor: initial;
}
#questions .answered .vote input:active,
#questions .answered .vote input:hover,
#questions .answered .vote input:focus {
background-position: left bottom;
cursor: initial;
}
/* Transition effects
----------------------------------------------------------------------------*/
#questions li,#questions .vote {
-webkit-transition: opacity 1s ease-in-out;
Search WWH ::
Custom Search