Home > Backend Development > PHP Tutorial > Yii controls the width of the dropdownlist/select control and the width of the option_PHP tutorial

Yii controls the width of the dropdownlist/select control and the width of the option_PHP tutorial

WBOY
Release: 2016-07-14 10:11:49
Original
1216 people have browsed it

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.




www.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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template