# DropDownCssClass

Develop powerful and lightweight web applications using ASP.NET MVC controls. Learn more about the ComponentOne MVC controls in ASP.NET MVC documentation.

## Content



You can get or set a CSS class name to add to the controls drop-down element. The property is useful when you are styling the drop-down element, because it is shown as a child of the document body rather than as a child of the control itself, which prevents using CSS selectors based on the parent control. You can use this property to display multiple columns in a ComboBox dropdown.<br /><br />The following code example demonstrates how to enable multi-column using [DropDownCssClass](/componentone/api/mvc/online-mvc/dotnet-framework-api/C1.Web.Mvc/C1.Web.Mvc.IDropDown.DropDownCssClass.html) property. This example uses the sample created in the [Quick Start](/componentone/docs/mvc/online-mvc/workwithcontrols/Input/ComboBox/ComboBoxQuickStart) section.

DropDownCssClass property is available in the following Input DropDown controls;

*   InputColor
*   InputDate
*   AutoComplete, ComboBox
*   InputTime
*   MultiSelect
*   Menu

The following image shows how the Menu appears after applying the **DropDownCssClass** property:![](https://cdn.mescius.io/document-site-files/images/2b3ac322-100e-4637-958d-fb40dcda3f44/images/dropdowncssinput.png)<br />The following code example demonstrates how to use DropDownCssClass property.

**IndexController.cs**

```razor
public ActionResult Index()
        {
        ViewBag.Cities = Models.Cities.GetCities();
        return View();
        }
```

<br />**ComboBox.cshtml**

```razor
<style>
    .multi-column
    {   display: flex;
        flex-wrap: wrap;
        max-width: 450px;
    }
</style>
@{ List<string> cities = ViewBag.Cities;}
@Html.C1().ComboBox().Bind(cities).SelectedIndex(0).IsEditable(false).DropDownCssClass("multi-column")
```