This is a migrated thread and some comments may be shown as answers.

Strange Combobox Width Styling

1 Answer 158 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 09 Jun 2016, 09:49 PM

Using UI for MVC (Q1 2016)

@(
    Html.Kendo().ComboBoxFor(m => m)
    .Filter(FilterType.Contains)
    .AutoBind(false)
    .Placeholder("Choose Course")
    .HtmlAttributes(new { style = "width:400px;" })

    //Removed for brevity

)

 

The following width style in the HtmlAttributes above will cause the combobox dropdown button wrapper div to increase as a percentage of the entire combobox (ie. the div gets wider as the entire combobox gets wider.). Is this the native behavior when changing the width of the combobox? I also have not had this issue with any other widgets. 

See attached png file.

1 Answer, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 09 Jun 2016, 09:56 PM

Fixed.... Geez. Feeling foolish lol.

 

In the default site.css stylesheet in the Content folder there is this setting:

input,
select,
textarea {
    max-width: 280px;
}

I removed it and the combobox is now fixed.

Tags
ComboBox
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Share this question
or