html - How to adjust this web page's look? -
i'm using smarty, php , html. i'm giving url of js fiddle of web page. can see there first question contained within box , othe questions , answers displayed out of box. want display them box. tried lot of tricks nothing worked me. @ last i'm asking here. can me in regard? in advance. smarty template code , fiddle link can see plain html of page follows: code smarty file:
<table class="manage_box" cellpadding="5" cellspacing="1" style="border:1px solid #996633; font-size:13px;" width="100%" > <tbody> {if $all_questions} {assign var='que_seq_no' value=1} {foreach from=$all_questions item=qstn_ans key=key} <tr> <td align="center" colspan="2"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr class="question_info"> <td valign="top"><b>question {$que_seq_no}. </b>{if $qstn_ans.question_directions}<br /><b>direction : </b>{$qstn_ans.question_directions}{/if}<br /><b>question : </b>{$qstn_ans.question_text} </td> <td align="right" width="5%" valign="bottom"><b>{$search_ques_id_str}{$qstn_ans.question_id}</b> </td> </tr> {if $test_details.is_test_questions_freez==0 && $all_questions && ($test_details.test_begin_time>$curent_server_time || $test_details.test_mode=='non-schedule') && ($test_details.is_test_lock=='0' || $test_details.is_test_lock=='')} <tr class="question_info"> <td align="right" valign="bottom" colspan="2" width="100%"><a href="change_test_question.php?test_id={$test_details.test_id}&question_id={$qstn_ans.question_id}">change question</a> </td> </tr> {/if} {if $qstn_ans.question_file} <tr class="question_info"> <td colspan="2"><img src="{$ques_thum_image_path}{$qstn_ans.question_id}_{$qstn_ans.question_file}" /> </td> </tr> {/if} {if $qstn_ans.question_has_sub_ques==0} {if $qstn_ans.answer} <tr> <td colspan="2">answers : </td> </tr> {foreach from=$qstn_ans.answer item=ans key=ans_no} <tr valign="top"> <td valign="top" colspan="2"> {if $ans.answer_is_right==1}{assign var='correct_ans' value=$ans_no+1} {/if} <b style="font-size:13px;">{$ans_no+1}.</b> {if $ans.answer_text!=''}{$ans.answer_text}{/if}<br /> {if $ans.answer_file!=''}<img src="{$ans_thumb_img_path}{$ans.answer_id}_{$ans.answer_file}" />{/if} </td> </tr> {/foreach} <tr> <td colspan="2"><b style="font-size:13px;">correct answer option : {$correct_ans}</b></td> </tr> {/if} {else} {if $qstn_ans.question_has_sub_ques==1 && $qstn_ans.sub_question} {foreach from=$qstn_ans.sub_question item=sub_ques_ans key=sub_ques_no} <tr> <td valign="top"><b style="font-size:13px;">sub-question {$que_seq_no}.{$sub_ques_no+1} ) </b>{$sub_ques_ans.question_text} </td> <td align="right" width="5%" valign="bottom"><b>{$search_ques_id_str}{$sub_ques_ans.question_id}</b> </td> </tr> {if $sub_ques_ans.question_file!=''} <tr> <td valign="top" colspan="2"><img src="{$ques_thum_image_path}{$sub_ques_ans.question_id}_{$sub_ques_ans.question_file}"> </td> </tr> {/if} {if $sub_ques_ans.answer} <tr> <td colspan="2">answer : </td> </tr> {foreach from=$sub_ques_ans.answer item=sub_ans key=sub_ans_no} <tr> <td valign="top" colspan="2"> {if $sub_ans.answer_is_right==1} {assign var='correct_sub_ans' value=$sub_ans_no+1} {/if} <b style="font-size:13px;">{$sub_ans_no+1} . </b>{if $sub_ansanswer_text!=''}{$sub_ans.answer_text}{/if}<br /> {if $sub_ans.answer_file!=''}<img src="{$ans_thumb_img_path}{$sub_ans.answer_id}_{$sub_ans.answer_file}" > {/if} </td> </tr> {/foreach} <tr> <td colspan="2"><b style="font-size:13px;">correct answer option : {$correct_sub_ans}</b> </td> </tr> {/if} {/foreach} {/if} {/if} </table> </td> </tr> {assign var='que_seq_no' value=$que_seq_no+1} {/foreach} {else} <tr> <td align="center" colspan="2"><b>no test questions available</b></td> </tr> {/if} </tbody> </table> {literal} <script language="javascript" type="text/javascript"> $('#close_details').click(function() { $('#transperant_popup').hide(); $('#transperant_popup_content').hide(); $('#transperant_popup_content').html(''); }); </script> {/literal}
from jsfiddls can need remove tag genereating after first question. because of tag first question diaplaying iside box whereas others not. manipulate in smarty template check php code of fetching questions, may tag should coming database itself. other there should no cause of such behavior.
Comments
Post a Comment