Yii CHtml::radioButtonList - CSS to align horizontally

后端 未结 3 2051
遥遥无期
遥遥无期 2021-01-18 18:56

I am using yii framework for my development . I wrote CSS and able to align my tags in html properly and I am using the same CSS for yii and the align

相关标签:
3条回答
  • 2021-01-18 19:25

    add this css code somewhere (to the end of css/main.css, for example):

    input[type=radio] + label, input[type=checkbox] + label { display:inline !important; }
    
    0 讨论(0)
  • 2021-01-18 19:26
    <?php echo CHtml::radioButtonList('gender_code','',array('Male'=>'Male','Female'=>'Female'),array(
        'labelOptions'=>array('style'=>'display:inline'), // add this code
        'separator'=>'',
    )); ?>
    
    0 讨论(0)
  • 2021-01-18 19:32

    Looks like you might need

    div#gender input
    {
        float:left;
    }
    
    0 讨论(0)
提交回复
热议问题