默认情况下,
option的宽度会由options中最宽的元素决定,并且同时决定着select控件的宽度
在Yii中,如果需要自定义select控件的宽度,可以用 htmlOptions定义,如下:
$currentSelectSource,
CHtml::listData($modelSource, 'domain_hash', 'site_name'),
array('empty'=>'-- 全 部 --','style'=>'width:200px;')
);?>
|
如果要自定义option的宽度,就没办法了,只能写CSS来定义。
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