php - How can I use <tables> like HTML in CActiveForm classin Yii to align my lables and textboxes? -


here sample code have made dropdown, 2 textboxes , button.now how can align them using tables use in html.

<div class="row">     <?php echo $form->labelex($model,'user_id');?>     <?php echo $form->dropdownlist($model,'user_id',array('all'=>'all','members'=>'members','businessusers'=>'businessusers','selectedusers'=>'selectedusers'));?>     <?php echo $form->error($model,'user_id'); ?> </div>  <div class="row">     <?php echo $form->labelex($model,'title'); ?>     <?php echo $form->textfield($model,'title'); ?>     <?php echo $form->error($model,'title'); ?> </div>   <div class="row">     <?php echo $form->labelex($model,'message'); ?>     <?php echo $form->textfield($model,'message'); ?>     <?php echo $form->error($model,'message'); ?> </div>   <div class="row buttons">     <?php echo chtml::submitbutton('send message'); ?> </div> 

untested, should work this.

<table>     <tbody>         <tr>             <td><?php echo $form->labelex($model,'user_id');?></td>             <td><?php echo $form->dropdownlist($model,'user_id',array('all'=>'all','members'=>'members','businessusers'=>'businessusers','selectedusers'=>'selectedusers'));?></td>             <td><?php echo $form->error($model,'user_id'); ?></td>         </tr>     </tbody> </table> 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -