How can I change the width of kendo ui combobox? I use version: 2012.3.1114 I've tried:
#options {
padding: 30px;
}
#options h3 {
font-size: 1em;
font-weight: bold;
margin: 25px 0 8px 0;
}
.k-combobox{
width:60px; }
Javascript: $("#select").kendoComboBox();
Html:
<select id="select">
<option value="null">nada</option>
<option value="true">ON</option>
<option value="false">OFF</option>
</select>
With a file it works but not in jsfiddle: example
Try This :
$(document).ready(function() {
$("#select").kendoComboBox();
$("#select").parent().css('width',"300px");
});
You can also do it like this :
$(document).ready(function() {
$("#select").width(400).kendoComboBox();
});
You can use an !important css declaration:
.k-combobox{
width: 125px !important;
}
其他有用的方法: .HtmlAttributes(new { style = "width: 200px;"})
通过https://stackoverflow.com/a/25725406/1923256
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.