Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change width of html.DropDownListFor()

I have small design question about

html.DropDownListFor() 

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

Thanks for answers

like image 508
Peter M. Avatar asked Jun 15 '10 22:06

Peter M.


1 Answers

If you are using Bootstrap it sets the max width to 280px in site.css.

You probably don't want to change that so to override it for individual controls set:

new { style = "max-width:100%:width:350px" }
like image 140
Mick Avatar answered Oct 05 '22 07:10

Mick