How to change width of html.DropDownListFor()

前端 未结 3 1010
我在风中等你
我在风中等你 2021-02-20 03:02

I have small design question about

html.DropDownListFor() 

How can I change width of html.DropDownListFor() ?? For example by css.

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-20 03:08

    Have you tried Html.DropDownListFor( new {width:"100"})

    or Html.DropDownListFor( new {@class:"longDropdownList"})

    EDIT

    
    
    <%= Html.DropDownListFor(x => x.Name, new SelectList(new List()), new { @class = "MakeWide" })%>
    

提交回复
热议问题