最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to resize a kendo ui combobox? - Stack Overflow

programmeradmin3浏览0评论

How can I change the width of kendo ui bobox? 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-bobox{
    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

How can I change the width of kendo ui bobox? 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-bobox{
    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

Share Improve this question asked Feb 8, 2013 at 18:25 vicenrelevicenrele 9713 gold badges19 silver badges38 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 9

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-bobox{
   width: 125px !important;
}

other useful way: .HtmlAttributes(new { style = "width: 200px;"}) via https://stackoverflow./a/25725406/1923256

发布评论

评论列表(0)

  1. 暂无评论