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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn