By default,
The width of the option will be determined by the widest element in options, and also determines the width of the select control
In Yii, if you need to customize the width of the select control, you can use htmlOptions to define it, as follows:
$currentSelectSource,
CHtml::listData($modelSource, 'domain_hash', 'site_name'),
array('empty'=>'-- all --','style'=>'width:200px;')
);?>
|
If you want to customize the width of the option, you have no choice but to write CSS to define it.
http://www.bkjia.com/PHPjc/477254.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477254.htmlTechArticleBy default, the width of option will be determined by the widest element in options, and also determines the width of the select control Width is in Yii. If you need to customize the width of the select control, you can use...