Strange Combobox Width Styling

2 posts, 0 answers
  1. Christopher
    Christopher avatar
    24 posts
    Member since:
    Mar 2016

    Posted 09 Jun Link to this post

    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.

  2. Christopher
    Christopher avatar
    24 posts
    Member since:
    Mar 2016

    Posted 09 Jun Link to this post

    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.

  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top