Reputation: 1095
This is my code:
<?php echo $form->dropDownList($model, 'type', CHtml::listData($ab->type, 'id', 'name'), array('class' => 'edit'), array('width:165px')); ?>
I am trying to add inline css to my dropdown, but my example does not work. Why ?
Upvotes: 0
Views: 795
Reputation: 9739
It should be like this:
<?php echo $form->dropDownList($model, 'type', CHtml::listData($ab->type, 'id', 'name'), array('class' => 'edit', 'style' => 'width:165px')); ?>
Upvotes: 2
Reputation: 6632
<?php echo $form->dropDownList($model, 'type', CHtml::listData($ab->type, 'id', 'name'), array('class' => 'edit', 'style'=>'width:165px;')); ?
Upvotes: 0